[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Tue Aug 31 21:20:09 CEST 2010
SVN commit 1170387 by jmhoffmann:
AbstractScanlineTextureMapper: Constify isOutOfTileRange(F).
M +14 -14 AbstractScanlineTextureMapper.cpp
M +6 -6 AbstractScanlineTextureMapper.h
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1170386:1170387
@@ -316,14 +316,14 @@
}
-bool AbstractScanlineTextureMapper::isOutOfTileRangeF( qreal itLon, qreal itLat,
- qreal itStepLon, qreal itStepLat,
- int n ) const
+bool AbstractScanlineTextureMapper::isOutOfTileRangeF( const qreal itLon, const qreal itLat,
+ const qreal itStepLon, const qreal itStepLat,
+ const int n ) const
{
- qreal minIPosX = itLon + itStepLon;
- qreal minIPosY = itLat + itStepLat;
- qreal maxIPosX = itLon + itStepLon * ( n - 1 );
- qreal maxIPosY = itLat + itStepLat * ( n - 1 );
+ const qreal minIPosX = itLon + itStepLon;
+ const qreal minIPosY = itLat + itStepLat;
+ const qreal maxIPosX = itLon + itStepLon * ( n - 1 );
+ const qreal maxIPosY = itLat + itStepLat * ( n - 1 );
return ( maxIPosX >= m_tileSize.width() || maxIPosX < 0
|| maxIPosY >= m_tileSize.height() || maxIPosY < 0
|| minIPosX >= m_tileSize.width() || minIPosX < 0
@@ -439,14 +439,14 @@
}
-bool AbstractScanlineTextureMapper::isOutOfTileRange( int itLon, int itLat,
- int itStepLon, int itStepLat,
- int n ) const
+bool AbstractScanlineTextureMapper::isOutOfTileRange( const int itLon, const int itLat,
+ const int itStepLon, const int itStepLat,
+ const int n ) const
{
- int minIPosX = ( itLon + itStepLon ) >> 7;
- int minIPosY = ( itLat + itStepLat ) >> 7;
- int maxIPosX = ( itLon + itStepLon * ( n - 1 ) ) >> 7;
- int maxIPosY = ( itLat + itStepLat * ( n - 1 ) ) >> 7;
+ const int minIPosX = ( itLon + itStepLon ) >> 7;
+ const int minIPosY = ( itLat + itStepLat ) >> 7;
+ const int maxIPosX = ( itLon + itStepLon * ( n - 1 ) ) >> 7;
+ const int maxIPosY = ( itLat + itStepLat * ( n - 1 ) ) >> 7;
return ( maxIPosX >= m_tileSize.width() || maxIPosX < 0
|| maxIPosY >= m_tileSize.height() || maxIPosY < 0
|| minIPosX >= m_tileSize.width() || minIPosX < 0
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.h #1170386:1170387
@@ -86,13 +86,13 @@
// Checks whether the pixelValueApprox method will make use of more than
// one tile
- bool isOutOfTileRange( int itLon, int itLat,
- int itStepLon, int itStepLat,
- int n ) const;
+ bool isOutOfTileRange( const int itLon, const int itLat,
+ const int itStepLon, const int itStepLat,
+ const int n ) const;
- bool isOutOfTileRangeF( qreal itLon, qreal itLat,
- qreal itStepLon, qreal itStepLat,
- int n ) const;
+ bool isOutOfTileRangeF( const qreal itLon, const qreal itLat,
+ const qreal itStepLon, const qreal itStepLat,
+ const int n ) const;
// maximum values for global texture coordinates
// ( with origin in upper left corner, measured in pixel)
More information about the Marble-commits
mailing list