summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-18 00:52:14 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-18 00:52:14 +0300
commitded3b455e53af47b190abb6050a2a8ba520855c3 (patch)
tree7b025958eaacc15a8a87e3d3982ecca66f43fe81 /src/resources
parent13358aab4dfcf636a2ef0905dd16e7045848d15c (diff)
downloadplus-ded3b455e53af47b190abb6050a2a8ba520855c3.tar.gz
plus-ded3b455e53af47b190abb6050a2a8ba520855c3.tar.bz2
plus-ded3b455e53af47b190abb6050a2a8ba520855c3.tar.xz
plus-ded3b455e53af47b190abb6050a2a8ba520855c3.zip
add restrict into resourcemanager.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/resourcemanager.cpp18
-rw-r--r--src/resources/resourcemanager.h15
2 files changed, 18 insertions, 15 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 143cf467e..82f7cfca8 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -342,8 +342,8 @@ bool ResourceManager::removeFromSearchPath(const std::string &path) const
return true;
}
-void ResourceManager::searchAndAddArchives(const std::string &path,
- const std::string &ext,
+void ResourceManager::searchAndAddArchives(const std::string &restrict path,
+ const std::string &restrict ext,
const bool append) const
{
const char *const dirSep = dirSeparator;
@@ -366,8 +366,9 @@ void ResourceManager::searchAndAddArchives(const std::string &path,
PhysFs::freeList(list);
}
-void ResourceManager::searchAndRemoveArchives(const std::string &path,
- const std::string &ext) const
+void ResourceManager::searchAndRemoveArchives(const std::string &restrict path,
+ const std::string &restrict ext)
+ const
{
const char *const dirSep = dirSeparator;
char **list = PhysFs::enumerateFiles(path.c_str());
@@ -950,8 +951,8 @@ void *ResourceManager::loadFile(const std::string &fileName, int &fileSize)
return buffer;
}
-bool ResourceManager::copyFile(const std::string &src,
- const std::string &dst) const
+bool ResourceManager::copyFile(const std::string &restrict src,
+ const std::string &restrict dst) const
{
PHYSFS_file *const srcFile = PhysFs::openRead(src.c_str());
if (!srcFile)
@@ -1021,8 +1022,9 @@ bool ResourceManager::loadTextFileLocal(const std::string &fileName,
return true;
}
-void ResourceManager::saveTextFile(std::string path, const std::string &name,
- const std::string &text) const
+void ResourceManager::saveTextFile(std::string path,
+ const std::string &restrict name,
+ const std::string &restrict text) const
{
if (!mkdir_r(path.c_str()))
{
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 9fa612e7c..4e954242f 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -98,15 +98,15 @@ class ResourceManager final
/**
* Searches for zip files and adds them to the search path.
*/
- void searchAndAddArchives(const std::string &path,
- const std::string &ext,
+ void searchAndAddArchives(const std::string &restrict path,
+ const std::string &restrict ext,
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;
+ void searchAndRemoveArchives(const std::string &restrict path,
+ const std::string &restrict ext) const;
/**
* Creates a directory in the write path
@@ -184,7 +184,8 @@ class ResourceManager final
* @return true on success, false on failure. An error message should be
* in the log file.
*/
- bool copyFile(const std::string &src, const std::string &dst) const;
+ bool copyFile(const std::string &restrict src,
+ const std::string &restrict dst) const;
/**
* Convenience wrapper around ResourceManager::get for loading
@@ -271,8 +272,8 @@ class ResourceManager final
static bool loadTextFileLocal(const std::string &fileName,
StringVect &lines);
- void saveTextFile(std::string path, const std::string &name,
- const std::string &text) const;
+ void saveTextFile(std::string path, const std::string &restrict name,
+ const std::string &restrict text) const;
Image *getRescaled(Image *const image,
const int width, const int height) A_WARN_UNUSED;