diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
commit | 6249432407af8730c10bccc7894c0725fcaf5e47 (patch) | |
tree | 3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/Util.cpp | |
parent | 59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff) |
beautify
Diffstat (limited to 'mert/Util.cpp')
-rw-r--r-- | mert/Util.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mert/Util.cpp b/mert/Util.cpp index ac7d1803b..67448292f 100644 --- a/mert/Util.cpp +++ b/mert/Util.cpp @@ -11,7 +11,8 @@ using namespace std; -namespace { +namespace +{ MosesTuning::Timer g_timer; int g_verbose = 0; @@ -56,7 +57,8 @@ size_t getNextPound(std::string &str, std::string &substr, return pos; } -void split(const std::string &s, char delim, std::vector<std::string> &elems) { +void split(const std::string &s, char delim, std::vector<std::string> &elems) +{ std::stringstream ss(s); std::string item; while(std::getline(ss, item, delim)) { @@ -65,7 +67,8 @@ void split(const std::string &s, char delim, std::vector<std::string> &elems) { } void Tokenize(const char *str, const char delim, - std::vector<std::string> *res) { + std::vector<std::string> *res) +{ while (1) { const char *begin = str; while (*str != delim && *str) str++; |