diff options
-rw-r--r-- | src/game-server/map.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game-server/map.cpp b/src/game-server/map.cpp index f66f8876..3821b0a8 100644 --- a/src/game-server/map.cpp +++ b/src/game-server/map.cpp @@ -65,8 +65,7 @@ Map::~Map() } } -void -Map::setSize(int width, int height) +void Map::setSize(int width, int height) { this->mWidth = width; this->mHeight = height; @@ -83,9 +82,11 @@ Map::setSize(int width, int height) const std::string &Map::getProperty(const std::string &key) const { + static std::string empty; std::map<std::string, std::string>::const_iterator i; i = mProperties.find(key); - if (i == mProperties.end()) return ""; + if (i == mProperties.end()) + return empty; return i->second; } @@ -159,8 +160,7 @@ bool Map::getWalk(int x, int y, char walkmask) const return !(mMetaTiles[x + y * mWidth].blockmask & walkmask); } -MetaTile* -Map::getMetaTile(int x, int y) +MetaTile *Map::getMetaTile(int x, int y) { return &mMetaTiles[x + y * mWidth]; } |