summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 17:48:55 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 17:49:54 +0100
commit3a54fb903f9cc2cc47a852dab6569848d19c6dad (patch)
tree57242e8b9965afba6177197677a6f8e388c3684c /src
parentcaa35916909ca81defbc03f8825eb582f68c0238 (diff)
downloadmanaserv-3a54fb903f9cc2cc47a852dab6569848d19c6dad.tar.gz
manaserv-3a54fb903f9cc2cc47a852dab6569848d19c6dad.tar.bz2
manaserv-3a54fb903f9cc2cc47a852dab6569848d19c6dad.tar.xz
manaserv-3a54fb903f9cc2cc47a852dab6569848d19c6dad.zip
Fixed compile warning
Diffstat (limited to 'src')
-rw-r--r--src/game-server/map.cpp10
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];
}