summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-19 21:25:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-19 21:25:27 +0300
commit7225c69c5bf2de13d32d6e9a658779405c8e2707 (patch)
tree5fbd69d62ae8bd65b7b7a2e9986041aee4829888 /src/resources/resourcemanager.cpp
parentc0af9f41451d782b316feea8cf93fc50d4bd6733 (diff)
downloadmanaverse-7225c69c5bf2de13d32d6e9a658779405c8e2707.tar.gz
manaverse-7225c69c5bf2de13d32d6e9a658779405c8e2707.tar.bz2
manaverse-7225c69c5bf2de13d32d6e9a658779405c8e2707.tar.xz
manaverse-7225c69c5bf2de13d32d6e9a658779405c8e2707.zip
Add strong typed bool enum Append.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index b32126403..f9f55ca03 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -333,11 +333,12 @@ bool ResourceManager::setWriteDir(const std::string &path) const
}
bool ResourceManager::addToSearchPath(const std::string &path,
- const bool append) const
+ const Append append) const
{
logger->log("Adding to PhysicsFS: %s (%s)", path.c_str(),
- append ? "append" : "prepend");
- if (!PhysFs::addToSearchPath(path.c_str(), append ? 1 : 0))
+ append == Append_true ? "append" : "prepend");
+ if (!PhysFs::addToSearchPath(path.c_str(),
+ append == Append_true ? 1 : 0))
{
logger->log("Error: %s", PHYSFS_getLastError());
return false;
@@ -358,7 +359,7 @@ bool ResourceManager::removeFromSearchPath(const std::string &path) const
void ResourceManager::searchAndAddArchives(const std::string &restrict path,
const std::string &restrict ext,
- const bool append) const
+ const Append append) const
{
const char *const dirSep = dirSeparator;
char **list = PhysFs::enumerateFiles(path.c_str());