diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-20 12:18:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-20 12:18:10 +0300 |
commit | 811b0152c0e3911a58c357ec84fac9f84dbe911a (patch) | |
tree | 6658623c25525417918503d8b69c9ebd29bebadd /src/resources/mapreader.cpp | |
parent | 91f1d79f268b657c834c8df2c24368fc6067df81 (diff) | |
download | manaverse-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.gz manaverse-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.bz2 manaverse-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.xz manaverse-811b0152c0e3911a58c357ec84fac9f84dbe911a.zip |
Add more profiler labels.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 6 |
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; } |