]> git.tdb.fi Git - libs/gl.git/commitdiff
Make is_resource_loaded const as it should be
authorMikko Rasa <tdb@tdb.fi>
Sat, 5 Sep 2015 20:03:39 +0000 (23:03 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 5 Sep 2015 20:03:39 +0000 (23:03 +0300)
source/resourcemanager.cpp
source/resourcemanager.h

index 40dcff9bc36876b649edaec7c0aeecca0aee45c1..f008fd272c212462d6db90bdfccc020b7298015a 100644 (file)
@@ -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<ManagedResource *>(r.get_manager_data());
        return managed ? managed->state==ManagedResource::LOADED : false;
index f554b3484c7e006006d9b292bc803aea136f9e50..5cc427f729cabaa4ec15eec927283d38297f4a68 100644 (file)
@@ -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 &);