summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-17 20:23:33 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-04 21:41:25 +0100
commitad276ae0d4679aee9d7e6082fa602b49c6fd940a (patch)
treedf3ff4eb6a315faaf722815c4af1e6398a40e81f /src/resources/resourcemanager.h
parent33130dd288f5842f0edde0fff8618cdfe3afc856 (diff)
downloadmana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.gz
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.bz2
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.xz
mana-client-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.zip
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)
Diffstat (limited to 'src/resources/resourcemanager.h')
-rw-r--r--src/resources/resourcemanager.h9
1 files changed, 5 insertions, 4 deletions
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 <code>NULL</code> 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 <code>NULL</code> 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.