diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-25 03:08:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-25 03:08:37 +0300 |
commit | 39029943851dfc318fabb95357e00b81d2735547 (patch) | |
tree | dfd195791587c51e6dca166dda8a016a1760d3bf /src/utils/translation/poparser.cpp | |
parent | 10f59701112130cf953a2af7ef4ae82d9d823fe6 (diff) | |
download | manaverse-39029943851dfc318fabb95357e00b81d2735547.tar.gz manaverse-39029943851dfc318fabb95357e00b81d2735547.tar.bz2 manaverse-39029943851dfc318fabb95357e00b81d2735547.tar.xz manaverse-39029943851dfc318fabb95357e00b81d2735547.zip |
Improve empty strings manipulation.
Diffstat (limited to 'src/utils/translation/poparser.cpp')
-rw-r--r-- | src/utils/translation/poparser.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index b7c9a55ec..3a415b27b 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -64,8 +64,8 @@ PoDict *PoParser::load(const std::string &lang, const std::string &fileName, else openFile(fileName); - mMsgId = ""; - mMsgStr = ""; + mMsgId.clear(); + mMsgStr.clear(); // cycle by msgid+msgstr while (readLine()) @@ -98,8 +98,8 @@ PoDict *PoParser::load(const std::string &lang, const std::string &fileName, mDict->set(mMsgId, mMsgStr); } - mMsgId = ""; - mMsgStr = ""; + mMsgId.clear(); + mMsgStr.clear(); } return mDict; @@ -135,7 +135,7 @@ bool PoParser::readMsgId() { // reading text from: "text" mMsgId += mLine.substr(1, mLine.size() - 2); - mLine = ""; + mLine.clear(); return true; } // stop reading in other case @@ -151,7 +151,7 @@ bool PoParser::readMsgId() // reading text from: msgid "text" mMsgId += mLine.substr(msgId1.size(), mLine.size() - 1 - msgId1.size()); - mLine = ""; + mLine.clear(); return true; } // stop reading if we don't read msgid before @@ -176,7 +176,7 @@ bool PoParser::readMsgStr() { // reading text from: "text" mMsgStr += mLine.substr(1, mLine.size() - 2); - mLine = ""; + mLine.clear(); return true; } // stop reading in other case @@ -191,7 +191,7 @@ bool PoParser::readMsgStr() // reading text from: msgid "text" mMsgStr += mLine.substr(msgStr1.size(), mLine.size() - 1 - msgStr1.size()); - mLine = ""; + mLine.clear(); return true; } } |