diff options
author | Jordi Vilalta Prat | 2010-10-12 02:18:11 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2010-10-12 02:18:11 +0000 |
commit | 8388e0dfea4ae0d80e51368acd12685c740c5bb5 (patch) | |
tree | f960376a145a830cd77b08264c1412f71ec02f7e /common/translation.cpp | |
parent | 43161858ac14bae4ac6dea114d8b3e7a8c1b293b (diff) | |
download | scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.gz scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.bz2 scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.zip |
JANITORAL: Clean trailing whitespaces.
svn-id: r53160
Diffstat (limited to 'common/translation.cpp')
-rw-r--r-- | common/translation.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/common/translation.cpp b/common/translation.cpp index b81deb6058..a33e1a5243 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -270,18 +270,18 @@ bool TranslationManager::openTranslationsFile(File& inFile) { // First try to open it directly (i.e. using the SearchMan). if (inFile.open("translations.dat")) return true; - + // Then look in the Themepath if we can find the file. if (ConfMan.hasKey("themepath")) return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile); - + return false; } bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile, int depth) { if (!node.exists() || !node.isReadable() || !node.isDirectory()) return false; - + // Check if we can find the file in this directory // Since File::open(FSNode) makes all the needed tests, it is not really // necessary to make them here. But it avoid printing warnings. @@ -290,21 +290,21 @@ bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile, if (inFile.open(fileNode)) return true; } - + // Check if we exceeded the given recursion depth if (depth - 1 == -1) - return false; - + return false; + // Otherwise look for it in sub-directories FSList fileList; if (!node.getChildren(fileList, FSNode::kListDirectoriesOnly)) return false; - + for (FSList::iterator i = fileList.begin(); i != fileList.end(); ++i) { if (openTranslationsFile(*i, inFile, depth == -1 ? - 1 : depth - 1)) return true; } - + // Not found in this directory or its sub-directories return false; } @@ -324,7 +324,7 @@ void TranslationManager::loadTranslationsInfoDat() { // Get number of translations int nbTranslations = in.readUint16BE(); - + // Skip all the block sizes for (int i = 0; i < nbTranslations + 2; ++i) in.readUint16BE(); @@ -473,11 +473,11 @@ String TranslationManager::getTranslation(const String &message, const String &) const TLangArray TranslationManager::getSupportedLanguageNames() const { return TLangArray(); } - + const char *TranslationManager::getCurrentCharset() { return "ASCII"; } - + const char *TranslationManager::getCurrentLanguage() { return "C"; } @@ -485,4 +485,3 @@ const char *TranslationManager::getCurrentLanguage() { #endif // USE_TRANSLATION } // End of namespace Common - |