From: Mikko Rasa Date: Sat, 5 Sep 2015 20:03:39 +0000 (+0300) Subject: Make is_resource_loaded const as it should be X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5f84c8caeb789571503b5491f941c8ec31b700fe;p=libs%2Fgl.git Make is_resource_loaded const as it should be --- 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 &);