summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-30 01:38:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-30 01:38:21 +0300
commit1c1474135a1caec3a6d552bc9bb24687d71e6178 (patch)
tree44bb88d6fb8fab80713377045af65ce24105bb4a /src/resources/resourcemanager/resourcemanager.cpp
parented02748ba9d122e5c5e40a4e4b09a2a3e22d3da5 (diff)
downloadplus-1c1474135a1caec3a6d552bc9bb24687d71e6178.tar.gz
plus-1c1474135a1caec3a6d552bc9bb24687d71e6178.tar.bz2
plus-1c1474135a1caec3a6d552bc9bb24687d71e6178.tar.xz
plus-1c1474135a1caec3a6d552bc9bb24687d71e6178.zip
Fix unused variables.
Diffstat (limited to 'src/resources/resourcemanager/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index b4e80d2c1..765790aac 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -69,7 +69,9 @@ ResourceManager::~ResourceManager()
ResourceIterator iter = mResources.begin();
#ifdef DEBUG_LEAKS
+#ifdef UNITTESTS
bool status(false);
+#endif
while (iter != mResources.end())
{
if (iter->second)
@@ -79,7 +81,9 @@ ResourceManager::~ResourceManager()
logger->log(std::string("ResourceLeak: ").append(
iter->second->getIdPath()).append(" (").append(
toString(iter->second->getRefCount())).append(")"));
+#ifdef UNITTESTS
status = true;
+#endif
}
}
++iter;
@@ -642,7 +646,9 @@ void ResourceManager::deleteInstance()
logger->log1("clean orphans end");
ResourceIterator iter = resourceManager->mResources.begin();
+#ifdef UNITTESTS
bool status(false);
+#endif
while (iter != resourceManager->mResources.end())
{
const Resource *const res = iter->second;
@@ -653,7 +659,9 @@ void ResourceManager::deleteInstance()
logger->log(std::string("ResourceLeak: ").append(
res->getIdPath()).append(" (").append(toString(
res->getRefCount())).append(")"));
+#ifdef UNITTESTS
status = true;
+#endif
}
}
++iter;