Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-13 16:13:44 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-13 16:13:44 +0400
commit8f0ba037f387505a1deb87c0ac85c68d2de521b7 (patch)
treebb4697803b697543203fcb62461e7c47d9c0bcf7 /mert/Util.cpp
parent3d70b2e1a5d66a6387b3b4fd023fc3bed2bb28a8 (diff)
Add comments.
Diffstat (limited to 'mert/Util.cpp')
-rw-r--r--mert/Util.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/mert/Util.cpp b/mert/Util.cpp
index cded1f1ea..dc4824559 100644
--- a/mert/Util.cpp
+++ b/mert/Util.cpp
@@ -38,19 +38,19 @@ int setverboselevel(int v)
return verbose;
}
-size_t getNextPound(std::string &theString, std::string &substring, const std::string delimiter)
+size_t getNextPound(std::string &str, std::string &substr,
+ const std::string &delimiter)
{
size_t pos = 0;
// skip all occurrences of delimiter
while (pos == 0) {
- // if ((pos = theString.find(delimiter)) != std::string::npos) {
- if (FindDelimiter(theString, delimiter, &pos)) {
- substring.assign(theString, 0, pos);
- theString.erase(0, pos + delimiter.size());
+ if (FindDelimiter(str, delimiter, &pos)) {
+ substr.assign(str, 0, pos);
+ str.erase(0, pos + delimiter.size());
} else {
- substring.assign(theString);
- theString.assign("");
+ substr.assign(str);
+ str.assign("");
}
}
return pos;