From f24ddad3fa0f843eb29a281426151cf1a5f31f4b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Sep 2012 23:47:11 +0300 Subject: add const to more classes, fix other small style issues. --- src/resources/resourcemanager.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/resources/resourcemanager.h') diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 540e5f882..dee7f5459 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -56,7 +56,7 @@ class ResourceManager public: typedef Resource *(*loader)(SDL_RWops *); - typedef Resource *(*generator)(void *); + typedef Resource *(*generator)(const void *const); ResourceManager(); @@ -95,13 +95,13 @@ class ResourceManager */ void searchAndAddArchives(const std::string &path, const std::string &ext, - const bool append); + const bool append) const; /** * Searches for zip files and remove them from the search path. */ void searchAndRemoveArchives(const std::string &path, - const std::string &ext); + const std::string &ext) const; /** * Creates a directory in the write path @@ -142,7 +142,8 @@ class ResourceManager * @return A valid resource or NULL if the resource could * not be generated. */ - Resource *get(const std::string &idPath, const generator fun, void *const data); + Resource *get(const std::string &idPath, const generator fun, + const void *const data); Resource *getFromCache(const std::string &idPath); @@ -255,7 +256,7 @@ class ResourceManager */ SDL_Surface *loadSDLSurface(const std::string &filename) const; - void scheduleDelete(SDL_Surface* surface); + void scheduleDelete(SDL_Surface *const surface); void clearScheduled(); -- cgit v1.2.3-70-g09d2