summaryrefslogtreecommitdiff
path: root/src/utils/translation/poparser.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 03:08:37 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 03:08:37 +0300
commit39029943851dfc318fabb95357e00b81d2735547 (patch)
treedfd195791587c51e6dca166dda8a016a1760d3bf /src/utils/translation/poparser.cpp
parent10f59701112130cf953a2af7ef4ae82d9d823fe6 (diff)
downloadplus-39029943851dfc318fabb95357e00b81d2735547.tar.gz
plus-39029943851dfc318fabb95357e00b81d2735547.tar.bz2
plus-39029943851dfc318fabb95357e00b81d2735547.tar.xz
plus-39029943851dfc318fabb95357e00b81d2735547.zip
Improve empty strings manipulation.
Diffstat (limited to 'src/utils/translation/poparser.cpp')
-rw-r--r--src/utils/translation/poparser.cpp16
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;
}
}