summaryrefslogtreecommitdiff
path: root/src/resources/image/subimage.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/resources/image/subimage.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/resources/image/subimage.cpp')
-rw-r--r--src/resources/image/subimage.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/resources/image/subimage.cpp b/src/resources/image/subimage.cpp
index 615474334..a26604d75 100644
--- a/src/resources/image/subimage.cpp
+++ b/src/resources/image/subimage.cpp
@@ -24,7 +24,7 @@
#ifdef DEBUG_IMAGES
#include "logger.h"
-#endif
+#endif // DEBUG_IMAGES
#include "debug.h"
@@ -47,10 +47,10 @@ SubImage::SubImage(Image *const parent,
mSource = parent->getIdPath();
#ifdef DEBUG_IMAGES
logger->log("set name2 %p, %s", this, mSource.c_str());
-#endif
+#endif // DEBUG_IMAGES
#ifdef DEBUG_BIND_TEXTURE
mIdPath = parent->getIdPath();
-#endif
+#endif // DEBUG_BIND_TEXTURE
}
else
{
@@ -80,7 +80,7 @@ SubImage::SubImage(Image *const parent,
}
mUseAlphaCache = false;
}
-#endif
+#endif // USE_SDL2
SubImage::SubImage(Image *const parent,
SDL_Surface *const image,
@@ -101,10 +101,10 @@ SubImage::SubImage(Image *const parent,
#ifdef DEBUG_IMAGES
logger->log("set name2 %p, %s", static_cast<void*>(this),
mSource.c_str());
-#endif
+#endif // DEBUG_IMAGES
#ifdef DEBUG_BIND_TEXTURE
mIdPath = parent->getIdPath();
-#endif
+#endif // DEBUG_BIND_TEXTURE
}
else
{
@@ -163,10 +163,10 @@ SubImage::SubImage(Image *const parent,
#ifdef DEBUG_IMAGES
logger->log("set name2 %p, %s", static_cast<void*>(this),
mSource.c_str());
-#endif
+#endif // DEBUG_IMAGES
#ifdef DEBUG_BIND_TEXTURE
mIdPath = parent->getIdPath();
-#endif
+#endif // DEBUG_BIND_TEXTURE
}
else
{
@@ -177,14 +177,14 @@ SubImage::SubImage(Image *const parent,
}
mIsAlphaVisible = mHasAlphaChannel;
}
-#endif
+#endif // USE_OPENGL
SubImage::~SubImage()
{
#ifdef DEBUG_IMAGES
logger->log("delete subimage: %p", static_cast<void*>(this));
logger->log(" %s, %s", mIdPath.c_str(), mSource.c_str());
-#endif
+#endif // DEBUG_IMAGES
// Avoid destruction of the image
mSDLSurface = nullptr;
// Avoid possible destruction of its alpha channel
@@ -192,16 +192,17 @@ SubImage::~SubImage()
#ifdef USE_SDL2
// Avoid destruction of texture
mTexture = nullptr;
-#endif
+#endif // USE_SDL2
#ifdef USE_OPENGL
mGLImage = 0;
-#endif
+#endif // USE_OPENGL
if (mParent)
{
#ifdef DEBUG_IMAGES
logger->log("decref from subminage: %p, parent: %p",
static_cast<void*>(this), static_cast<void*>(mParent));
-#endif
+#endif // DEBUG_IMAGES
+
mParent->decRef();
mParent = nullptr;
}
@@ -221,7 +222,7 @@ void SubImage::decRef()
{
Resource::decRef();
}
-#endif
+#endif // USE_OPENGL
int SubImage::calcMemoryLocal() const
{