diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-15 21:14:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-15 21:14:04 +0300 |
commit | 7b89705cc5c491b60dab923e2f8079cfc1f4bce1 (patch) | |
tree | a3a5ceb5a142b9b954eab23c39946b0825218169 /src/resources/map/map.cpp | |
parent | 8b22861c92f1cec3af31b8b9e97b16498b2d86d0 (diff) | |
download | mv-7b89705cc5c491b60dab923e2f8079cfc1f4bce1.tar.gz mv-7b89705cc5c491b60dab923e2f8079cfc1f4bce1.tar.bz2 mv-7b89705cc5c491b60dab923e2f8079cfc1f4bce1.tar.xz mv-7b89705cc5c491b60dab923e2f8079cfc1f4bce1.zip |
Convert BlockType into strong typed enum.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r-- | src/resources/map/map.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index e206edef2..e1407af91 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -148,7 +148,7 @@ Map::Map(const int width, const int height, mDrawOnlyFringe(false) { const int size = mWidth * mHeight; - for (int i = 0; i < BlockType::NB_BLOCKTYPES; i++) + for (size_t i = 0; i < static_cast<size_t>(BlockType::NB_BLOCKTYPES); i++) { mOccupation[i] = new unsigned[static_cast<size_t>(size)]; memset(mOccupation[i], 0, static_cast<size_t>(size) @@ -171,7 +171,7 @@ Map::~Map() CHECKLISTENERS delete [] mMetaTiles; - for (int i = 0; i < BlockType::NB_BLOCKTYPES; i++) + for (size_t i = 0; i < static_cast<size_t>(BlockType::NB_BLOCKTYPES); i++) delete [] mOccupation[i]; if (mWalkLayer) @@ -690,7 +690,7 @@ const Tileset *Map::getTilesetWithGid(const int gid) const } void Map::blockTile(const int x, const int y, - const BlockType::BlockType type) + const BlockTypeT type) { if (type == BlockType::NONE || !contains(x, y)) return; |