summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-15 00:32:07 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-15 00:32:07 +0300
commit57288890689bfa2c2d35882169a539813be621f1 (patch)
tree8c2886837e997d073906cb85aee38c9d77a8069b /src/resources
parent53947c9d39440424dcf815ea5df130e833457437 (diff)
downloadmanaverse-57288890689bfa2c2d35882169a539813be621f1.tar.gz
manaverse-57288890689bfa2c2d35882169a539813be621f1.tar.bz2
manaverse-57288890689bfa2c2d35882169a539813be621f1.tar.xz
manaverse-57288890689bfa2c2d35882169a539813be621f1.zip
add RWops leaks reporting.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/atlasmanager.cpp3
-rw-r--r--src/resources/resourcemanager.cpp7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index b0ac91540..b60ee0a50 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -31,6 +31,7 @@
#include "render/surfacegraphics.h"
#include "utils/mathutils.h"
+#include "utils/physfscheckutils.h"
#include "utils/physfsrwops.h"
#include "utils/sdlcheckutils.h"
@@ -116,7 +117,7 @@ void AtlasManager::loadImages(const StringVect &files,
path = path.substr(0, p);
}
- SDL_RWops *const rw = PHYSFSRWOPS_openRead(path.c_str());
+ SDL_RWops *const rw = MPHYSFSRWOPS_openRead(path.c_str());
if (rw)
{
Image *const image = d ? surfaceImageHelper->load(rw, *d)
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 3d13e6e00..bd422ca0e 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -41,6 +41,7 @@
#include "resources/spritedef.h"
#include "utils/mkdir.h"
+#include "utils/physfscheckutils.h"
#include "utils/physfsrwops.h"
#include "utils/sdlcheckutils.h"
@@ -567,7 +568,7 @@ struct ResourceLoader
return nullptr;
const ResourceLoader *const
rl = static_cast<const ResourceLoader *const>(v);
- SDL_RWops *const rw = PHYSFSRWOPS_openRead(rl->path.c_str());
+ SDL_RWops *const rw = MPHYSFSRWOPS_openRead(rl->path.c_str());
if (!rw)
return nullptr;
Resource *const res = rl->fun(rw);
@@ -613,7 +614,7 @@ struct DyedImageLoader
d = new Dye(path.substr(p + 1));
path = path.substr(0, p);
}
- SDL_RWops *const rw = PHYSFSRWOPS_openRead(path.c_str());
+ SDL_RWops *const rw = MPHYSFSRWOPS_openRead(path.c_str());
if (!rw)
{
delete d;
@@ -1044,7 +1045,7 @@ void ResourceManager::saveTextFile(std::string path, const std::string &name,
SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const
{
- if (SDL_RWops *const rw = PHYSFSRWOPS_openRead(filename.c_str()))
+ if (SDL_RWops *const rw = MPHYSFSRWOPS_openRead(filename.c_str()))
{
if (!IMG_isPNG(rw))
{