summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 5270e6f60..9beba49e7 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -399,6 +399,12 @@ Resource *ResourceManager::getFromCache(const std::string &filename,
return getFromCache(ss.str());
}
+bool ResourceManager::isInCache(const std::string &idPath) const
+{
+ const ResourceCIterator &resIter = mResources.find(idPath);
+ return (resIter != mResources.end() && resIter->second);
+}
+
Resource *ResourceManager::getFromCache(const std::string &idPath)
{
// Check if the id exists, and return the value if it does.