summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-30 15:05:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-30 15:06:56 +0300
commit177b4569cb798d8b292c66a93b42bf3224f9fdb7 (patch)
treec2af5f8511eb309bb35e7808fffb11062ba7b910
parent49ef874d739f7d9da226424935f65da2a342c6bb (diff)
downloadmanaverse-177b4569cb798d8b292c66a93b42bf3224f9fdb7.tar.gz
manaverse-177b4569cb798d8b292c66a93b42bf3224f9fdb7.tar.bz2
manaverse-177b4569cb798d8b292c66a93b42bf3224f9fdb7.tar.xz
manaverse-177b4569cb798d8b292c66a93b42bf3224f9fdb7.zip
Fix compilation with debugging flags and show additional info on exit.
-rw-r--r--src/client.cpp5
-rw-r--r--src/commandhandler.cpp1
-rw-r--r--src/resources/resourcemanager.h4
3 files changed, 8 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 3efd9c593..79ec041ba 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -780,6 +780,11 @@ void Client::gameClear()
if (logger)
logger->log1("Quitting11");
+#ifdef DEBUG_OPENGL_LEAKS
+ if (logger)
+ logger->log("textures left: %d", textures_count);
+#endif
+
delete chatLogger;
chatLogger = nullptr;
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index ee06fe776..1afc332cb 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -65,6 +65,7 @@
#include "resources/image.h"
#include "resources/resource.h"
#include "resources/resourcemanager.h"
+#include "resources/subimage.h"
#endif
#include "utils/gettext.h"
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 4900b7ce3..0eadf683d 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -269,10 +269,10 @@ class ResourceManager
typedef Resources::iterator ResourceIterator;
#ifdef DEBUG_DUMP_LEAKS
- Resources* getResources() const
+ Resources* getResources()
{ return &mResources; }
- Resources* getOrphanedResources() const
+ Resources* getOrphanedResources()
{ return &mOrphanedResources; }
#endif