From ad276ae0d4679aee9d7e6082fa602b49c6fd940a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 17 Dec 2008 20:23:33 +0100 Subject: Code reformatting Mainly making sure 'const std::string &' is used everywhere instead of 'std::string const &'. The former has always been the preferred order in this project. (cherry picked from mainline) --- src/resources/resourcemanager.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/resources/resourcemanager.h') diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index c1007f4a..e70dfb9d 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -98,7 +98,8 @@ class ResourceManager bool isDirectory(const std::string &path); /** - * Returns the real path to a file + * Returns the real path to a file. Note that this method will always + * return a path, it does not check whether the file exists. * * @param file The file to get the real path to. * @return The real path. @@ -114,7 +115,7 @@ class ResourceManager * @return A valid resource or NULL if the resource could * not be generated. */ - Resource *get(std::string const &idPath, generator fun, void *data); + Resource *get(const std::string &idPath, generator fun, void *data); /** * Loads a resource from a file and adds it to the resource map. @@ -124,7 +125,7 @@ class ResourceManager * @return A valid resource or NULL if the resource could * not be loaded. */ - Resource *load(std::string const &path, loader fun); + Resource *load(const std::string &path, loader fun); /** * Convenience wrapper around ResourceManager::get for loading @@ -154,7 +155,7 @@ class ResourceManager * Creates a sprite definition based on a given path and the supplied * variant. */ - SpriteDef *getSprite(std::string const &path, int variant = 0); + SpriteDef *getSprite(const std::string &path, int variant = 0); /** * Releases a resource, placing it in the set of orphaned resources. -- cgit v1.2.3-70-g09d2