diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-28 15:53:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-29 00:18:56 +0300 |
commit | ee1a05faf157c8c9f0f43cf5b906d84f39ded497 (patch) | |
tree | d560c7235c09e1117dc9172867c6acb0895edd64 /src/resources | |
parent | afbf2f713dd918bd0ff050d71afbf05bc581ab6e (diff) | |
download | mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.gz mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.bz2 mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.xz mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.zip |
fix compilation errors and warnings in debug checkers.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/atlasmanager.cpp | 9 | ||||
-rw-r--r-- | src/resources/image.cpp | 7 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 9 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.cpp | 2 | ||||
-rw-r--r-- | src/resources/subimage.cpp | 6 |
5 files changed, 22 insertions, 11 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp index 3b8f6a326..015ad0c93 100644 --- a/src/resources/atlasmanager.cpp +++ b/src/resources/atlasmanager.cpp @@ -125,7 +125,8 @@ void AtlasManager::loadImages(const StringVect &files, { image->mIdPath = str; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", image, image->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(image), + image->mIdPath.c_str()); #endif images.push_back(image); } @@ -274,7 +275,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas) image->mIdPath = atlas->name; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", image, image->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(image), + image->mIdPath.c_str()); #endif image->incRef(); @@ -291,7 +293,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas) { image2->mIdPath = item->name; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", image2, image2->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(image2), + image2->mIdPath.c_str()); #endif image2->incRef(); } diff --git a/src/resources/image.cpp b/src/resources/image.cpp index b5a852996..cd8231e7b 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -115,7 +115,7 @@ Image::Image(SDL_Surface *const image, const bool hasAlphaChannel0, mIsAlphaCalculated(false) { #ifdef DEBUG_IMAGES - logger->log("created: %p", this); + logger->log("created: %p", static_cast<void*>(this)); #endif mBounds.x = 0; @@ -159,7 +159,7 @@ Image::Image(const GLuint glimage, const int width, const int height, mIsAlphaCalculated(false) { #ifdef DEBUG_IMAGES - logger->log("created: %p", this); + logger->log("created: %p", static_cast<void*>(this)); #endif mBounds.x = 0; @@ -182,7 +182,8 @@ Image::Image(const GLuint glimage, const int width, const int height, Image::~Image() { #ifdef DEBUG_IMAGES - logger->log("delete: %p, %s, %s", this, mIdPath.c_str(), mSource.c_str()); + logger->log("delete: %p, %s, %s", static_cast<void*>(this), + mIdPath.c_str(), mSource.c_str()); #endif unload(); } diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 662024f36..3d13e6e00 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -450,7 +450,8 @@ bool ResourceManager::addResource(const std::string &idPath, resource->incRef(); resource->mIdPath = idPath; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", resource, resource->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(resource), + resource->mIdPath.c_str()); #endif mResources[idPath] = resource; return true; @@ -522,7 +523,8 @@ Resource *ResourceManager::get(const std::string &idPath, const generator fun, resource->incRef(); resource->mIdPath = idPath; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", resource, resource->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(resource), + resource->mIdPath.c_str()); #endif mResources[idPath] = resource; cleanOrphans(); @@ -539,7 +541,8 @@ Resource *ResourceManager::get(const std::string &idPath, const generator fun, resource->incRef(); resource->mIdPath = idPath; #ifdef DEBUG_IMAGES - logger->log("set name %p, %s", resource, resource->mIdPath.c_str()); + logger->log("set name %p, %s", static_cast<void*>(resource), + resource->mIdPath.c_str()); #endif } else diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index cc5460fde..cf8d1d04a 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -33,6 +33,8 @@ #include "resources/image.h" +#include "utils/sdlcheckutils.h" + #include <SDL_gfxBlitFunc.h> #include <SDL_image.h> diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp index 8a8fa2735..a13a885bb 100644 --- a/src/resources/subimage.cpp +++ b/src/resources/subimage.cpp @@ -105,7 +105,8 @@ SubImage::SubImage(Image *const parent, SDL_Surface *const image, mAlphaChannel = mParent->SDLgetAlphaChannel(); mSource = parent->getIdPath(); #ifdef DEBUG_IMAGES - logger->log("set name2 %p, %s", this, mSource.c_str()); + logger->log("set name2 %p, %s", static_cast<void*>(this), + mSource.c_str()); #endif #ifdef DEBUG_BIND_TEXTURE mIdPath = parent->getIdPath(); @@ -164,7 +165,8 @@ SubImage::SubImage(Image *const parent, const GLuint image, mInternalBounds.h = mParent->mBounds.h; mSource = parent->getIdPath(); #ifdef DEBUG_IMAGES - logger->log("set name2 %p, %s", this, mSource.c_str()); + logger->log("set name2 %p, %s", static_cast<void*>(this), + mSource.c_str()); #endif #ifdef DEBUG_BIND_TEXTURE mIdPath = parent->getIdPath(); |