summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/resourcemanager.cpp9
-rw-r--r--src/resources/resourcemanager.h7
2 files changed, 10 insertions, 6 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());
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index c7c2cffe1..13d05f0b2 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -23,6 +23,8 @@
#ifndef RESOURCES_RESOURCEMANAGER_H
#define RESOURCES_RESOURCEMANAGER_H
+#include "enums/simpletypes/append.h"
+
#include "utils/stringvector.h"
#include <map>
@@ -78,7 +80,8 @@ class ResourceManager final
*
* @return <code>true</code> on success, <code>false</code> otherwise.
*/
- bool addToSearchPath(const std::string &path, const bool append) const;
+ bool addToSearchPath(const std::string &path,
+ const Append append) const;
/**
* Remove a directory or archive from the search path.
@@ -92,7 +95,7 @@ class ResourceManager final
*/
void searchAndAddArchives(const std::string &restrict path,
const std::string &restrict ext,
- const bool append) const;
+ const Append append) const;
/**
* Searches for zip files and remove them from the search path.