summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-31 19:49:21 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-31 19:49:21 +0300
commitcca552c123e6522541b15e7cf4f51f3ec0fcf564 (patch)
tree2efc351ab14d91722de0b7cd2d5932a42235989c /src/resources/mapreader.cpp
parent5d5f60a40dcd343ed34d4257b2383e9ed9091c3f (diff)
downloadmanaverse-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.gz
manaverse-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.bz2
manaverse-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.xz
manaverse-cca552c123e6522541b15e7cf4f51f3ec0fcf564.zip
Improve profiler speed.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 9e6422c58..f8515d021 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -231,13 +231,13 @@ void MapReader::addLayerToList(const std::string &fileName)
Map *MapReader::readMap(const std::string &restrict filename,
const std::string &restrict realFilename)
{
- BLOCK_START("MapReader::readMap")
+ BLOCK_START("MapReader::readMap str")
logger->log("Attempting to read map %s", realFilename.c_str());
XML::Document doc(realFilename);
if (!doc.isLoaded())
{
- BLOCK_END("MapReader::readMap")
+ BLOCK_END("MapReader::readMap str")
return createEmptyMap(filename, realFilename);
}
@@ -267,7 +267,7 @@ Map *MapReader::readMap(const std::string &restrict filename,
updateMusic(map);
}
- BLOCK_END("MapReader::readMap")
+ BLOCK_END("MapReader::readMap str")
return map;
}
@@ -294,6 +294,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
if (!node)
return nullptr;
+ BLOCK_START("MapReader::readMap xml")
// Take the filename off the path
const std::string pathDir = path.substr(0, path.rfind("/") + 1);
@@ -311,6 +312,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
logger->log("MapReader: Warning: "
"Unitialized tile width or height value for map: %s",
path.c_str());
+ BLOCK_END("MapReader::readMap xml")
return nullptr;
}
@@ -451,6 +453,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
map->reduce();
map->setWalkLayer(resman->getWalkLayer(fileName, map));
unloadTempLayers();
+ BLOCK_END("MapReader::readMap xml")
return map;
}