summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/resources/resourcemanager.cpp12
-rw-r--r--src/resources/resourcemanager.h11
2 files changed, 4 insertions, 19 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index cc990f811..0f3f10f76 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -542,20 +542,16 @@ struct ResourceLoader final
}
};
-Resource *ResourceManager::load(const std::string &path, const loader fun)
-{
- ResourceLoader rl = { this, path, fun };
- return get(path, ResourceLoader::load, &rl);
-}
-
SDLMusic *ResourceManager::getMusic(const std::string &idPath)
{
- return static_cast<SDLMusic*>(load(idPath, &SDLMusic::load));
+ ResourceLoader rl = { this, idPath, &SDLMusic::load };
+ return static_cast<SDLMusic*>(get(idPath, ResourceLoader::load, &rl));
}
SoundEffect *ResourceManager::getSoundEffect(const std::string &idPath)
{
- return static_cast<SoundEffect*>(load(idPath, &SoundEffect::load));
+ ResourceLoader rl = { this, idPath, &SoundEffect::load };
+ return static_cast<SoundEffect*>(get(idPath, ResourceLoader::load, &rl));
}
struct DyedImageLoader final
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 651142e29..92454c0c7 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -124,17 +124,6 @@ class ResourceManager final : public MemoryCounter
const int variant) A_WARN_UNUSED;
/**
- * Loads a resource from a file and adds it to the resource map.
- *
- * @param path The file name.
- * @param fun A function for parsing the file.
- * @return A valid resource or <code>NULL</code> if the resource could
- * not be loaded.
- */
- Resource *load(const std::string &path,
- const loader fun) A_WARN_UNUSED;
-
- /**
* Adds a preformatted resource to the resource map.
*
* @param path The file name.