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:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 21:16:15 +0400
commit6249432407af8730c10bccc7894c0725fcaf5e47 (patch)
tree3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /moses/Util.h
parent59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff)
beautify
Diffstat (limited to 'moses/Util.h')
-rw-r--r--moses/Util.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/moses/Util.h b/moses/Util.h
index 9f43d9dc3..e5bdc820a 100644
--- a/moses/Util.h
+++ b/moses/Util.h
@@ -363,27 +363,27 @@ std::string PassthroughSGML(std::string &line, const std::string tagName,const s
*/
inline std::string GetFirstString(const std::string& str, int& first_pos, const std::string& delimiters = " \t")
{
-
- std::string first_str;
- // Skip delimiters at beginning.
- std::string::size_type lastPos = str.find_first_not_of(delimiters, first_pos);
-
- // Find first "non-delimiter".
- std::string::size_type pos = str.find_first_of(delimiters, lastPos);
-
- if (std::string::npos != pos || std::string::npos != lastPos){
-
- first_str = str.substr(lastPos, pos - lastPos);
-
- // Skip delimiters. Note the "not_of"
- lastPos = str.find_first_not_of(delimiters, pos);
-
- }
-
- first_pos = lastPos;
- return first_str;
+
+ std::string first_str;
+ // Skip delimiters at beginning.
+ std::string::size_type lastPos = str.find_first_not_of(delimiters, first_pos);
+
+ // Find first "non-delimiter".
+ std::string::size_type pos = str.find_first_of(delimiters, lastPos);
+
+ if (std::string::npos != pos || std::string::npos != lastPos) {
+
+ first_str = str.substr(lastPos, pos - lastPos);
+
+ // Skip delimiters. Note the "not_of"
+ lastPos = str.find_first_not_of(delimiters, pos);
+
+ }
+
+ first_pos = lastPos;
+ return first_str;
}
-
+
template<class T>
T log_sum (T log_a, T log_b)
{