From 1747bd6f63710cf728c8cdd2bffd217520ea6a83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Aug 2016 20:37:17 +0300 Subject: Remove some unused functions from loadSDLSurface. --- src/resources/resourcemanager/resourcemanager.cpp | 16 ---------------- src/resources/resourcemanager/resourcemanager.h | 7 ------- 2 files changed, 23 deletions(-) diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp index 1e8b3cdb7..49a59b832 100644 --- a/src/resources/resourcemanager/resourcemanager.cpp +++ b/src/resources/resourcemanager/resourcemanager.cpp @@ -650,22 +650,6 @@ void ResourceManager::deleteInstance() delete2(instance); } -SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const -{ - if (SDL_RWops *const rw = MPHYSFSRWOPS_openRead(filename.c_str())) - { - if (!IMG_isPNG(rw)) - { - reportAlways("Error, image is not png: %s", filename.c_str()); - return nullptr; - } - SDL_Surface *const surface = MIMG_LoadPNG_RW(rw); - SDL_RWclose(rw); - return surface; - } - return nullptr; -} - void ResourceManager::scheduleDelete(SDL_Surface *const surface) { deletedSurfaces.insert(surface); diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h index ee70cb768..c1e55355b 100644 --- a/src/resources/resourcemanager/resourcemanager.h +++ b/src/resources/resourcemanager/resourcemanager.h @@ -138,13 +138,6 @@ class ResourceManager final : public MemoryCounter */ void moveToDeleted(Resource *const res); - /** - * Loads the given filename as an SDL surface. The returned surface is - * expected to be freed by the caller using SDL_FreeSurface. - */ - SDL_Surface *loadSDLSurface(const std::string &filename) - const A_WARN_UNUSED; - void scheduleDelete(SDL_Surface *const surface); void clearScheduled(); -- cgit v1.2.3-70-g09d2