From 3c404128c4669a1f4f190e20a89553677717fc50 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Sep 2016 22:01:44 +0300 Subject: Add missing comments into defines. --- src/utils/sdlcheckutils.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/utils/sdlcheckutils.cpp') 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(surface)); -#endif +#endif // DEBUG_SURFACE_ALLOCATION + std::map::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::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" -- cgit v1.2.3-70-g09d2