diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-29 14:12:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-02 12:09:56 +0200 |
commit | 6ef9f7e2025a2334034e9c8f7b3422220add4742 (patch) | |
tree | a97096df0d2627574f685ed37b3abbe296833538 /vcl | |
parent | acd4ecc38fc3aa486b7eaf8d5effa4a5ea034ccd (diff) |
loplugin:loopvartoosmall
Change-Id: Ib4def3435eab4625645c5afe3b151f9f430564ac
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/bmp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalmenu.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 4 |
8 files changed, 17 insertions, 17 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 08106412e268..d95e30bca6d7 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -315,7 +315,7 @@ void SalDisplay::doDestruct() delete mpInputMethod, mpInputMethod = NULL; delete mpKbdExtension, mpKbdExtension = NULL; - for( unsigned int i = 0; i < m_aScreens.size(); i++ ) + for( size_t i = 0; i < m_aScreens.size(); i++ ) { ScreenData& rData = m_aScreens[i]; if( rData.m_bInit ) @@ -1939,7 +1939,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) case PropertyNotify: if( pEvent->xproperty.atom == getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ) ) { - for( unsigned int i = 0; i < m_aScreens.size(); i++ ) + for( size_t i = 0; i < m_aScreens.size(); i++ ) { if( pEvent->xproperty.window == m_aScreens[i].m_aRefWindow ) { @@ -2685,7 +2685,7 @@ static sal_uInt16 sal_Lookup( const std::vector<SalColor>& rPalette, sal_uInt16 nPixel = 0; int nBest = ColorDiff( rPalette[0], r, g, b ); - for( sal_uInt16 i = 1; i < nUsed; i++ ) + for( Pixel i = 1; i < nUsed; i++ ) { int n = ColorDiff( rPalette[i], r, g, b ); diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 31d7969107be..43432cf24696 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -391,7 +391,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "supported protocols:\n" ); #endif - for( unsigned int i = 0; i < nItems; i++ ) + for( unsigned long i = 0; i < nItems; i++ ) { // #i80971# protect against invalid atoms if( pAtomNames[i] == NULL ) @@ -649,7 +649,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "supported protocols:\n" ); #endif - for( unsigned int i = 0; i < nItems; i++ ) + for( unsigned long i = 0; i < nItems; i++ ) { // #i80971# protect against invalid atoms if( pAtomNames[i] == NULL ) @@ -1476,7 +1476,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert { Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 ); const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) + for( size_t i = 0; i < rScreens.size(); i++ ) if( rScreens[i].IsInside( aMed ) ) { aTL += rScreens[i].TopLeft(); @@ -2076,7 +2076,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const &root_x, &root_y, &lx, &ly, &mask ); const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); Point aMousePoint( root_x, root_y ); - for( unsigned int i = 0; i < rScreens.size(); i++ ) + for( size_t i = 0; i < rScreens.size(); i++ ) { if( rScreens[i].IsInside( aMousePoint ) ) { diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 427bd54cc049..720b8c6e41bf 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -1674,7 +1674,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest bool bResetAtoms = false; Atom* pAtoms = reinterpret_cast<Atom*>(pData); aGuard.clear(); - for( unsigned int i = 0; i < nItems; i += 2 ) + for( unsigned long i = 0; i < nItems; i += 2 ) { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, " %s => %s: ", diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index b4dcc04d5e10..b84681e8a1b3 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -449,7 +449,7 @@ void PixmapHolder::setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage sal_uInt32 nHeight = readLE32( pData+8 ); sal_uInt16 nDepth = readLE16( pData+14 ); - for( sal_uInt16 i = 0 ; i < nColors; i++ ) + for( sal_uInt32 i = 0 ; i < nColors; i++ ) { if( m_aInfo.c_class != TrueColor ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 3ad0f9a70eaf..1591ffe520ef 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -508,7 +508,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP &aRoot, &aChild, &root_x, &root_y, &lx, &ly, &mask ); const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) + for( size_t i = 0; i < rScreens.size(); i++ ) if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) { x = rScreens[i].Left(); @@ -1466,7 +1466,7 @@ void X11SalFrame::Center( ) &x, &y, &mask ); const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); - for( unsigned int i = 0; i < rScreens.size(); i++ ) + for( size_t i = 0; i < rScreens.size(); i++ ) if( rScreens[i].IsInside( Point( root_x, root_y ) ) ) { nScreenX = rScreens[i].Left(); diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 39b44cd6a993..a34c143b99f9 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -567,7 +567,7 @@ void GtkData::initNWF() *********************************************************/ void GtkData::deInitNWF() { - for( unsigned int i = 0; i < gWidgetData.size(); i++ ) + for( size_t i = 0; i < gWidgetData.size(); i++ ) { // free up global widgets // gtk_widget_destroy will in turn destroy the child hierarchy @@ -871,7 +871,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, if( GtkSalGraphics::bThemeChanged ) { // invalidate caches - for( unsigned int i = 0; i < gWidgetData.size(); i++ ) + for( size_t i = 0; i < gWidgetData.size(); i++ ) if( gWidgetData[i].gNWPixmapCacheList ) gWidgetData[i].gNWPixmapCacheList->ThemeChanged(); GtkSalGraphics::bThemeChanged = false; diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx index 4cd662208a59..6ecfeaab65d5 100644 --- a/vcl/unx/gtk/window/gtksalmenu.cxx +++ b/vcl/unx/gtk/window/gtksalmenu.cxx @@ -708,7 +708,7 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub { SolarMutexGuard aGuard; GtkSalMenu* pMenu = NULL; - for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ ) + for ( size_t nPos = 0; nPos < maItems.size(); nPos++ ) { GtkSalMenuItem *pSalItem = maItems[ nPos ]; @@ -754,7 +754,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand ) void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar) { pMenuBar->HandleMenuActivateEvent(mpVCLMenu); - for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ ) + for ( size_t nPos = 0; nPos < maItems.size(); nPos++ ) { GtkSalMenuItem *pSalItem = maItems[ nPos ]; if ( pSalItem->mpSubMenu != NULL ) diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 7bc6270f8c2f..5d8a6c4c33d1 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -288,9 +288,9 @@ public: rDev.SetLineColor(Color(COL_BLACK)); rDev.DrawRect(r); - for(int i=0; i<r.GetHeight(); i+=15) + for(long i=0; i<r.GetHeight(); i+=15) rDev.DrawLine(Point(r.Left(), r.Top()+i), Point(r.Right(), r.Bottom()-i)); - for(int i=0; i<r.GetWidth(); i+=15) + for(long i=0; i<r.GetWidth(); i+=15) rDev.DrawLine(Point(r.Left()+i, r.Bottom()), Point(r.Right()-i, r.Top())); // Should draw a white-line across the middle |