diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-29 18:23:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-29 18:26:49 +0300 |
commit | 1dca2012e1eb6083fc71c573c148e4c197a2bfad (patch) | |
tree | ccfb740d9fa2d24b3cf536071d4c39132a77e278 /src/resources | |
parent | 6afd82349bca7e8f5580057e3c1b9133e51c60c2 (diff) | |
download | plus-1dca2012e1eb6083fc71c573c148e4c197a2bfad.tar.gz plus-1dca2012e1eb6083fc71c573c148e4c197a2bfad.tar.bz2 plus-1dca2012e1eb6083fc71c573c148e4c197a2bfad.tar.xz plus-1dca2012e1eb6083fc71c573c148e4c197a2bfad.zip |
In memory usage tree not show 0 for child objects.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/memorymanager.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/resources/memorymanager.cpp b/src/resources/memorymanager.cpp index 2da7c0908..4a14a5e73 100644 --- a/src/resources/memorymanager.cpp +++ b/src/resources/memorymanager.cpp @@ -61,12 +61,22 @@ void MemoryManager::printMemory(const std::string &name, const int childsSum) { std::string str(level, ' '); - logger->log("%s%s: %d = %d + %d", - str.c_str(), - name.c_str(), - localSum + childsSum, - localSum, - childsSum); + if (childsSum > 0) + { + logger->log("%s%s: %d = %d + %d", + str.c_str(), + name.c_str(), + localSum + childsSum, + localSum, + childsSum); + } + else + { + logger->log("%s%s: %d", + str.c_str(), + name.c_str(), + localSum); + } } void MemoryManager::printAllMemory(ChatTab *const tab A_DYECMD_UNUSED) |