diff options
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index fe49d64d6..b1c6537f6 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -572,92 +572,6 @@ impHandler0(dumpGL) } #endif -#ifdef DEBUG_DUMP_LEAKS1 -void showRes(std::string str, ResourceManager::Resources *res); - -void showRes(std::string str, ResourceManager::Resources *res) -{ - if (!res) - return; - - str.append(toString(res->size())); - if (debugChatTab) - debugChatTab->chatLog(str); - logger->log(str); - ResourceManager::ResourceIterator iter = res->begin(); - const ResourceManager::ResourceIterator iter_end = res->end(); - while (iter != iter_end) - { - if (iter->second && iter->second->getRefCount()) - { - char type = ' '; - char isNew = 'N'; - if (iter->second->getDumped()) - isNew = 'O'; - else - iter->second->setDumped(true); - - 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 (image) - type = 'I'; - if (image) - id = image->getGLImage(); - logger->log("Resource %c%c: %s (%d) id=%d", type, - isNew, iter->second->getIdPath().c_str(), - iter->second->getRefCount(), id); - } - ++ iter; - } -} - -impHandler(dump) -{ - if (!debugChatTab) - return false; - - ResourceManager *const resman = ResourceManager::getInstance(); - - if (!event.args.empty()) - { - ResourceManager::Resources *res = resman->getResources(); - // TRANSLATORS: dump command - showRes(_("Resource images:"), res); - res = resman->getOrphanedResources(); - // TRANSLATORS: dump command - showRes(_("Resource orphaned images:"), res); - } - else - { - ResourceManager::Resources *res = resman->getResources(); - // TRANSLATORS: dump command - debugChatTab->chatLog(_("Resource images:") + toString(res->size())); - res = resman->getOrphanedResources(); - // TRANSLATORS: dump command - debugChatTab->chatLog(_("Resource orphaned images:") - + toString(res->size())); - } - return true; -} - -#elif defined ENABLE_MEM_DEBUG -impHandler0(dump) -{ - check_leaks(); - return true; -} -#else -impHandler0(dump) -{ - return true; -} -#endif - - impHandler0(dumpOGL) { #if defined USE_OPENGL && !defined ANDROID |