From 6c05739c62484dae8d5ed9fb0dfdb6590aacfe88 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Sep 2013 13:48:24 +0300 Subject: improve a bit strings declaration. --- src/utils/translation/translationmanager.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/utils/translation/translationmanager.cpp') diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp index 0a5e7bca5..6036ddeab 100644 --- a/src/utils/translation/translationmanager.cpp +++ b/src/utils/translation/translationmanager.cpp @@ -109,14 +109,11 @@ bool TranslationManager::translateFile(const std::string &fileName, const size_t pos2 = str.find(">>", pos1 + 2); if (pos2 == std::string::npos) break; - const std::string key = str.substr(pos1 + 2, pos2 - pos1 - 2); - const std::string key2 = "<<" + str.substr( - pos1 + 2, pos2 - pos1 - 2) + ">>"; - const std::string val = dict->getStr(key); - -// logger->log("key:" + key); + const std::string key(str.substr(pos1 + 2, pos2 - pos1 - 2)); + const std::string key2("<<" + str.substr( + pos1 + 2, pos2 - pos1 - 2) + ">>"); + const std::string val(dict->getStr(key)); replaceAll(str, key2, val); - oldPos1 = pos1; } -- cgit v1.2.3-70-g09d2