From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/resources/map/maplayer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/resources/map/maplayer.cpp') diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index bedd0da35..6567b2177 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -135,7 +135,7 @@ void MapLayer::draw(Graphics *const graphics, const int py0 = y32 + dy; - TileInfo *tilePtr = &mTiles[static_cast(startX + yWidth)]; + TileInfo *tilePtr = &mTiles[CAST_SIZE(startX + yWidth)]; for (int x = startX; x < endX; x++, tilePtr++) { @@ -235,7 +235,7 @@ void MapLayer::updateSDL(const Graphics *const graphics, const int yWidth = y * mWidth; const int py0 = y * mapTileSize + dy; - TileInfo *tilePtr = &mTiles[static_cast(startX + yWidth)]; + TileInfo *tilePtr = &mTiles[CAST_SIZE(startX + yWidth)]; for (int x = startX; x < endX; x++, tilePtr++) { @@ -304,7 +304,7 @@ void MapLayer::updateOGL(Graphics *const graphics, { const int yWidth = y * mWidth; const int py0 = y * mapTileSize + dy; - TileInfo *tilePtr = &mTiles[static_cast(startX + yWidth)]; + TileInfo *tilePtr = &mTiles[CAST_SIZE(startX + yWidth)]; for (int x = startX; x < endX; x++, tilePtr++) { if (!tilePtr->isEnabled) @@ -509,7 +509,7 @@ void MapLayer::drawFringe(Graphics *const graphics, const int py0 = y32 + dy; const int py1 = y32 - scrollY; - TileInfo *tilePtr = &mTiles[static_cast(startX + yWidth)]; + TileInfo *tilePtr = &mTiles[CAST_SIZE(startX + yWidth)]; for (int x = startX; x < endX; x++, tilePtr++) { if (!tilePtr->isEnabled) @@ -598,7 +598,7 @@ void MapLayer::drawFringe(Graphics *const graphics, const int py0 = y32 + dy; - TileInfo *tilePtr = &mTiles[static_cast(startX + yWidth)]; + TileInfo *tilePtr = &mTiles[CAST_SIZE(startX + yWidth)]; for (int x = startX; x < endX; x++, tilePtr++) { if (!tilePtr->isEnabled) -- cgit v1.2.3-60-g2f50