From da05d9dd98315378bdded216184294f376643191 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 14:14:34 +0300 Subject: Use resource manager as global variable. --- src/utils/files.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/utils/files.cpp') 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()); } -- cgit v1.2.3-70-g09d2