summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/mapreader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 75238e828..7481ad948 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -181,6 +181,7 @@ int inflateMemory(unsigned char *const in, const unsigned int inLength,
Map *MapReader::readMap(const std::string &filename,
const std::string &realFilename)
{
+ BLOCK_START("MapReader::readMap")
logger->log("Attempting to read map %s", realFilename.c_str());
// Load the file through resource manager
const ResourceManager *const resman = ResourceManager::getInstance();
@@ -189,7 +190,10 @@ Map *MapReader::readMap(const std::string &filename,
Map *map = nullptr;
if (!buffer)
+ {
+ BLOCK_END("MapReader::readMap")
return createEmptyMap(filename, realFilename);
+ }
unsigned char *inflated;
unsigned int inflatedSize;
@@ -206,6 +210,7 @@ Map *MapReader::readMap(const std::string &filename,
{
logger->log("Could not decompress map file (%s)",
realFilename.c_str());
+ BLOCK_END("MapReader::readMap")
return nullptr;
}
}
@@ -243,6 +248,7 @@ Map *MapReader::readMap(const std::string &filename,
updateMusic(map);
}
+ BLOCK_END("MapReader::readMap")
return map;
}