Fix signed/unsigned comparison

This commit is contained in:
Seth Hillbrand 2020-06-15 08:59:09 -07:00
parent 2a334a5c59
commit a18aea3a43
1 changed files with 3 additions and 3 deletions

View File

@ -208,18 +208,18 @@ int COMMON_TOOLS::doZoomInOut( bool aDirection, bool aCenterOnCursor )
if( aDirection ) if( aDirection )
{ {
for( idx = 0; idx < (int)zoomList.size(); ++idx ) for( idx = 0; idx < int( zoomList.size() ); ++idx )
{ {
if( zoomList[idx] >= zoom ) if( zoomList[idx] >= zoom )
break; break;
} }
if( idx >= zoomList.size() ) if( idx >= int( zoomList.size() ) )
idx = (int) zoomList.size() - 1; // if we ran off the end then peg to the end idx = (int) zoomList.size() - 1; // if we ran off the end then peg to the end
} }
else else
{ {
for( idx = (int) zoomList.size() - 1; idx >= 0; --idx ) for( idx = int( zoomList.size() ) - 1; idx >= 0; --idx )
{ {
if( zoomList[idx] <= zoom ) if( zoomList[idx] <= zoom )
break; break;