summaryrefslogtreecommitdiff
path: root/src/utils/sdlcheckutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/utils/sdlcheckutils.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/utils/sdlcheckutils.cpp')
-rw-r--r--src/utils/sdlcheckutils.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp
index 8c2f77dbd..b35d151fd 100644
--- a/src/utils/sdlcheckutils.cpp
+++ b/src/utils/sdlcheckutils.cpp
@@ -46,7 +46,8 @@ static SDL_Surface *addSurface(const char *restrict const name,
#ifdef DEBUG_SURFACE_ALLOCATION
logger->log("add surface: %s %s:%u %p", name,
file, line, static_cast<void*>(surface));
-#endif
+#endif // DEBUG_SURFACE_ALLOCATION
+
std::map<void*, SDLMemoryObject*>::iterator
it = mSurfaces.find(surface);
if (it != mSurfaces.end())
@@ -58,7 +59,8 @@ static SDL_Surface *addSurface(const char *restrict const name,
logger->log("adding existing surface: %p, count:%d\n"
"was add %s\nwas deleted %s", surface, obj->mCnt,
obj->mAddFile.c_str(), obj->mRemoveFile.c_str());
-#endif
+#endif // DEBUG_SURFACE_ALLOCATION
+
obj->mCnt ++;
}
}
@@ -76,7 +78,8 @@ static void deleteSurface(const char *restrict const name A_UNUSED,
{
#ifdef DEBUG_SURFACE_ALLOCATION
logger->log("delete surface: %s %s:%u %p", name, file, line, surface);
-#endif
+#endif // DEBUG_SURFACE_ALLOCATION
+
std::map<void*, SDLMemoryObject*>::iterator
it = mSurfaces.find(surface);
if (it == mSurfaces.end())
@@ -94,7 +97,8 @@ static void deleteSurface(const char *restrict const name A_UNUSED,
logger->log("debug deleting surface: %p, count:%d\n"
"was add %s\nwas deleted %s", surface, cnt,
obj->mAddFile.c_str(), obj->mRemoveFile.c_str());
-#endif
+#endif // DEBUG_SURFACE_ALLOCATION
+
if (cnt < 1)
{ // surface was here but was deleted
logger->log("deleting already deleted surface: %p at %s:%d\n"