summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-30 20:07:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-30 20:07:15 +0300
commitf5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad (patch)
tree4fb1bd61cc2ea8013cddc2e8da17fc7fe1057c7a /src/commandhandler.cpp
parent8b984259c0d7d7af5394defc89a3b64d7b479425 (diff)
downloadplus-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.gz
plus-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.bz2
plus-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.tar.xz
plus-f5ed6062017598fbdf9c3a7e4c53b5eeeddfe3ad.zip
Improve debuging resource allocation.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp14
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;
}