summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
commitda05d9dd98315378bdded216184294f376643191 (patch)
treeffc4b984c73c3bb68d26a1df6481634254075744 /src/utils
parentec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff)
downloadplus-da05d9dd98315378bdded216184294f376643191.tar.gz
plus-da05d9dd98315378bdded216184294f376643191.tar.bz2
plus-da05d9dd98315378bdded216184294f376643191.tar.xz
plus-da05d9dd98315378bdded216184294f376643191.zip
Use resource manager as global variable.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/files.cpp10
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());
}