diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-11-20 19:34:09 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-11-20 19:34:09 +0000 |
| commit | f339cc8431c0a7b6a4d514599e6fa57a75eb6495 (patch) | |
| tree | 0d7ac1ea36b3819a6c4f0d0538dbf3c4d7d76245 /src/shared/gameinfo.cpp | |
| parent | 49de6e8d2555234c5da132c5fc35287083fe7ef7 (diff) | |
Member variable unused so removed it.
Leaves one asking *why* the datapath can be inside the game directory.
Diffstat (limited to 'src/shared/gameinfo.cpp')
| -rw-r--r-- | src/shared/gameinfo.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index e5e47cdf..703f4a40 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -40,8 +40,8 @@ namespace MOShared { GameInfo* GameInfo::s_Instance = nullptr;
-GameInfo::GameInfo(const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : m_GameDirectory(gameDirectory), m_OrganizerDataDirectory(moDataDirectory)
+GameInfo::GameInfo(const std::wstring &gameDirectory)
+ : m_GameDirectory(gameDirectory)
{
atexit(&cleanup);
}
@@ -87,36 +87,36 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) }
-bool GameInfo::identifyGame(const std::wstring &moDataDirectory, const std::wstring &searchPath)
+bool GameInfo::identifyGame(const std::wstring &searchPath)
{
if (OblivionInfo::identifyGame(searchPath)) {
- s_Instance = new OblivionInfo(moDataDirectory, searchPath);
+ s_Instance = new OblivionInfo(searchPath);
} else if (Fallout3Info::identifyGame(searchPath)) {
- s_Instance = new Fallout3Info(moDataDirectory, searchPath);
+ s_Instance = new Fallout3Info(searchPath);
} else if (FalloutNVInfo::identifyGame(searchPath)) {
- s_Instance = new FalloutNVInfo(moDataDirectory, searchPath);
+ s_Instance = new FalloutNVInfo(searchPath);
} else if (SkyrimInfo::identifyGame(searchPath)) {
- s_Instance = new SkyrimInfo(moDataDirectory, searchPath);
+ s_Instance = new SkyrimInfo(searchPath);
}
return s_Instance != nullptr;
}
-bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath)
+bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &gamePath)
{
if (s_Instance == nullptr) {
if (gamePath.length() == 0) {
// search upward in the directory until a recognized game-binary is found
std::wstring searchPath(moDirectory);
- while (!identifyGame(moDataDirectory, searchPath)) {
+ while (!identifyGame(searchPath)) {
size_t lastSep = searchPath.find_last_of(L"/\\");
if (lastSep == std::string::npos) {
return false;
}
searchPath.erase(lastSep);
}
- } else if (!identifyGame(moDataDirectory, gamePath)) {
+ } else if (!identifyGame(gamePath)) {
return false;
}
}
|
