diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-30 20:07:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-30 20:07:15 +0300 |
commit | f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad (patch) | |
tree | 4fb1bd61cc2ea8013cddc2e8da17fc7fe1057c7a /src/commandhandler.cpp | |
parent | 8b984259c0d7d7af5394defc89a3b64d7b479425 (diff) | |
download | mv-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.gz mv-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.bz2 mv-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.xz mv-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.zip |
Improve debuging resource allocation.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 6140b398e..d17d2b636 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -1260,13 +1260,19 @@ void showRes(std::string str, ResourceManager::Resources *res) else iter->second->setDumped(true); - if (dynamic_cast<SubImage*>(iter->second)) + SubImage *const subImage = dynamic_cast<SubImage *const>( + iter->second); + Image *const image = dynamic_cast<Image *const>(iter->second); + int id = 0; + if (subImage) type = "S"; - else if (dynamic_cast<Image*>(iter->second)) + else if (image) type = "I"; - logger->log("Resource %s%s: %s (%d)", type.c_str(), + if (image) + id = image->getGLImage(); + logger->log("Resource %s%s: %s (%d) id=%d", type.c_str(), isNew.c_str(), iter->second->getIdPath().c_str(), - iter->second->getRefCount()); + iter->second->getRefCount(), id); } ++ iter; } |