summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-22 02:03:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-22 02:03:59 +0300
commit5133814218de74d57c7febadf61b3ab05216dc25 (patch)
tree60b88270c9a50ef333fefed38c805baab00429a1 /src/resources/mapreader.cpp
parentcc7a39f467a49b2e91717739cb6e7c3c4b34a245 (diff)
downloadmanaplus-5133814218de74d57c7febadf61b3ab05216dc25.tar.gz
manaplus-5133814218de74d57c7febadf61b3ab05216dc25.tar.bz2
manaplus-5133814218de74d57c7febadf61b3ab05216dc25.tar.xz
manaplus-5133814218de74d57c7febadf61b3ab05216dc25.zip
Remove default parameters from properties.h
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 4d0b89b3a..352830a7b 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -292,7 +292,7 @@ Map *MapReader::readMap(const std::string &restrict filename,
map->setProperty("_filename", realFilename);
map->setProperty("_realfilename", filename);
- if (map->getProperty("music").empty())
+ if (map->getProperty("music", std::string()).empty())
updateMusic(map);
map->updateConditionLayers();
@@ -410,7 +410,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
{
readProperties(childNode, map);
map->setVersion(atoi(map->getProperty(
- "manaplus version").c_str()));
+ "manaplus version", std::string()).c_str()));
}
else if (xmlNameEqual(childNode, "objectgroup"))
{
@@ -506,7 +506,8 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
map->initializeAmbientLayers();
map->clearIndexedTilesets();
- map->setActorsFix(0, atoi(map->getProperty("actorsfix").c_str()));
+ map->setActorsFix(0,
+ atoi(map->getProperty("actorsfix", std::string()).c_str()));
map->reduce();
map->setWalkLayer(Loader::getWalkLayer(fileName, map));
unloadTempLayers();
@@ -1290,7 +1291,7 @@ Map *MapReader::createEmptyMap(const std::string &restrict filename,
void MapReader::updateMusic(Map *const map)
{
- std::string name = map->getProperty("shortName");
+ std::string name = map->getProperty("shortName", std::string());
const size_t p = name.rfind('.');
if (p != std::string::npos)
name = name.substr(0, p);