From 5f84c8caeb789571503b5491f941c8ec31b700fe Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 5 Sep 2015 23:03:39 +0300 Subject: [PATCH] Make is_resource_loaded const as it should be --- source/resourcemanager.cpp | 2 +- source/resourcemanager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/resourcemanager.cpp b/source/resourcemanager.cpp index 40dcff9b..f008fd27 100644 --- a/source/resourcemanager.cpp +++ b/source/resourcemanager.cpp @@ -111,7 +111,7 @@ void ResourceManager::load_resource(Resource &r) } } -bool ResourceManager::is_resource_loaded(const Resource &r) +bool ResourceManager::is_resource_loaded(const Resource &r) const { ManagedResource *managed = reinterpret_cast(r.get_manager_data()); return managed ? managed->state==ManagedResource::LOADED : false; diff --git a/source/resourcemanager.h b/source/resourcemanager.h index f554b348..5cc427f7 100644 --- a/source/resourcemanager.h +++ b/source/resourcemanager.h @@ -137,7 +137,7 @@ public: void set_resource_location(Resource &, const ResourceLocation &); const ResourceLocation *get_resource_location(const Resource &) const; void load_resource(Resource &); - bool is_resource_loaded(const Resource &); + bool is_resource_loaded(const Resource &) const; void resource_used(const Resource &); void remove_resource(Resource &); -- 2.45.2