summaryrefslogtreecommitdiff
path: root/src/gui/windows/updaterwindow.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/gui/windows/updaterwindow.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/gui/windows/updaterwindow.cpp')
-rw-r--r--src/gui/windows/updaterwindow.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 784fd2ad5..9597de849 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -663,7 +663,7 @@ void UpdaterWindow::loadUpdates()
UpdaterWindow::addUpdateFile(mUpdatesDir,
fixPath,
file.name,
- false);
+ Append_false);
}
loadManaPlusUpdates(mUpdatesDir);
loadMods(mUpdatesDir, mUpdateFiles);
@@ -693,7 +693,7 @@ void UpdaterWindow::loadLocalUpdates(const std::string &dir)
UpdaterWindow::addUpdateFile(dir,
fixPath,
file.name,
- false);
+ Append_false);
}
loadManaPlusUpdates(dir);
loadMods(dir, updateFiles);
@@ -740,7 +740,7 @@ void UpdaterWindow::loadManaPlusUpdates(const std::string &dir)
std::string fileName = std::string(fixPath).append(
"/").append(name);
if (!stat(fileName.c_str(), &statbuf))
- resourceManager->addToSearchPath(fileName, false);
+ resourceManager->addToSearchPath(fileName, Append_false);
}
}
}
@@ -769,10 +769,10 @@ void UpdaterWindow::unloadManaPlusUpdates(const std::string &dir)
void UpdaterWindow::addUpdateFile(const std::string &restrict path,
const std::string &restrict fixPath,
const std::string &restrict file,
- const bool append)
+ const Append append)
{
const std::string tmpPath = std::string(path).append("/").append(file);
- if (!append)
+ if (append == Append_false)
resourceManager->addToSearchPath(tmpPath, append);
const std::string fixFile = std::string(fixPath).append("/").append(file);
@@ -780,7 +780,7 @@ void UpdaterWindow::addUpdateFile(const std::string &restrict path,
if (!stat(fixFile.c_str(), &statbuf))
resourceManager->addToSearchPath(fixFile, append);
- if (append)
+ if (append == Append_false)
resourceManager->addToSearchPath(tmpPath, append);
}
@@ -1097,7 +1097,7 @@ void UpdaterWindow::loadMods(const std::string &dir,
UpdaterWindow::addUpdateFile(dir,
fixPath,
file.name,
- false);
+ Append_false);
}
}
@@ -1121,7 +1121,7 @@ void UpdaterWindow::loadMods(const std::string &dir,
std::string fileName = std::string(fixPath).append(
"/").append(name);
if (!stat(fileName.c_str(), &statbuf))
- resourceManager->addToSearchPath(fileName, false);
+ resourceManager->addToSearchPath(fileName, Append_false);
}
}
}
@@ -1148,7 +1148,10 @@ void UpdaterWindow::loadDirMods(const std::string &dir)
{
const std::string &localDir = mod->getLocalDir();
if (!localDir.empty())
- resourceManager->addToSearchPath(dir + "/" + localDir, false);
+ {
+ resourceManager->addToSearchPath(dir + "/" + localDir,
+ Append_false);
+ }
}
}
}