From da05d9dd98315378bdded216184294f376643191 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 14:14:34 +0300 Subject: Use resource manager as global variable. --- src/actions/actions.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 329202612..5dd1cbb6c 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1001,7 +1001,7 @@ impHandler0(who) impHandler0(cleanGraphics) { - ResourceManager::getInstance()->clearCache(); + resourceManager->clearCache(); if (debugChatTab) { @@ -1216,24 +1216,22 @@ impHandler(dump) if (!debugChatTab) return false; - ResourceManager *const resman = ResourceManager::getInstance(); - if (!event.args.empty()) { - ResourceManager::Resources *res = resman->getResources(); + ResourceManager::Resources *res = resourceManager->getResources(); // TRANSLATORS: dump command showRes(_("Resource images:"), res); - res = resman->getOrphanedResources(); + res = resourceManager->getOrphanedResources(); // TRANSLATORS: dump command showRes(_("Resource orphaned images:"), res); } else { - ResourceManager::Resources *res = resman->getResources(); + ResourceManager::Resources *res = resourceManager->getResources(); // TRANSLATORS: dump command debugChatTab->chatLog(_("Resource images:") + toString(res->size()), ChatMsgType::BY_SERVER); - res = resman->getOrphanedResources(); + res = resourceManager->getOrphanedResources(); // TRANSLATORS: dump command debugChatTab->chatLog(_("Resource orphaned images:") + toString(res->size()), -- cgit v1.2.3-60-g2f50