diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
commit | da05d9dd98315378bdded216184294f376643191 (patch) | |
tree | ffc4b984c73c3bb68d26a1df6481634254075744 /src/utils/files.cpp | |
parent | ec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff) | |
download | manaplus-da05d9dd98315378bdded216184294f376643191.tar.gz manaplus-da05d9dd98315378bdded216184294f376643191.tar.bz2 manaplus-da05d9dd98315378bdded216184294f376643191.tar.xz manaplus-da05d9dd98315378bdded216184294f376643191.zip |
Use resource manager as global variable.
Diffstat (limited to 'src/utils/files.cpp')
-rw-r--r-- | src/utils/files.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp index 1c942823a..578865503 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -45,8 +45,7 @@ void Files::extractLocale() const std::string fileName2 = std::string(getenv( "APPDIR")).append("/locale.zip"); - const ResourceManager *const resman = ResourceManager::getInstance(); - resman->addToSearchPath(fileName2, false); + resourceManager->addToSearchPath(fileName2, false); const std::string localDir = std::string(getenv("APPDIR")).append("/"); char **rootDirs = PhysFs::enumerateFiles("locale"); @@ -66,7 +65,7 @@ void Files::extractLocale() } } PhysFs::freeList(rootDirs); - resman->removeFromSearchPath(fileName2); + resourceManager->removeFromSearchPath(fileName2); remove(fileName2.c_str()); } #endif // ANDROID @@ -123,10 +122,9 @@ void Files::extractZip(const std::string &restrict zipName, const std::string &restrict inDir, const std::string &restrict outDir) { - const ResourceManager *const resman = ResourceManager::getInstance(); - resman->addToSearchPath(zipName, false); + resourceManager->addToSearchPath(zipName, false); copyPhysFsDir(inDir, outDir); - resman->removeFromSearchPath(zipName); + resourceManager->removeFromSearchPath(zipName); remove(zipName.c_str()); } |