From bb87f2911b63eaf80e49d689bf52ecf2042ae098 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 May 2014 20:31:09 +0300 Subject: Move from resourcemanager functions related to files into other files. --- src/utils/translation/poparser.cpp | 6 +++--- src/utils/translation/translationmanager.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/utils/translation') diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index bcb577f84..7e78ade9d 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -22,6 +22,7 @@ #include "resources/resourcemanager.h" +#include "utils/physfstools.h" #include "utils/stringutils.h" #include "utils/translation/podict.h" @@ -48,7 +49,7 @@ void PoParser::openFile(const std::string &name) if (!resman) return; int size; - char *buf = static_cast(resman->loadFile(getFileName(name), size)); + char *buf = static_cast(PhysFs::loadFile(getFileName(name), size)); if (buf) { @@ -231,8 +232,7 @@ PoDict *PoParser::getEmptyDict() bool PoParser::checkLang(const std::string &lang) { // check is po file exists - const ResourceManager *const resman = ResourceManager::getInstance(); - return resman->exists(getFileName(lang)); + return PhysFs::exists(getFileName(lang).c_str()); } std::string PoParser::getFileName(const std::string &lang) diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp index 9bbdec810..5fddee639 100644 --- a/src/utils/translation/translationmanager.cpp +++ b/src/utils/translation/translationmanager.cpp @@ -21,6 +21,7 @@ #include "utils/translation/translationmanager.h" #include "utils/delete2.h" +#include "utils/physfstools.h" #include "utils/stringutils.h" #include "utils/translation/podict.h" @@ -85,9 +86,8 @@ bool TranslationManager::translateFile(const std::string &fileName, return false; int contentsLength; - const ResourceManager *const resman = ResourceManager::getInstance(); char *fileContents = static_cast( - resman->loadFile(fileName, contentsLength)); + PhysFs::loadFile(fileName, contentsLength)); if (!fileContents) { -- cgit v1.2.3-70-g09d2