diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-05 13:54:29 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-16 22:03:22 +0300 |
commit | 7d21af8c9bcc64ec189b276399c840fc44b7957c (patch) | |
tree | b40f523093e7c7c6e593bd462ac2db9dd7059362 /moses/Util.h | |
parent | 73217dd0087c06d226b08f7da59e89221ea473bc (diff) |
use util::StringStream
Diffstat (limited to 'moses/Util.h')
-rw-r--r-- | moses/Util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/moses/Util.h b/moses/Util.h index f726e89d2..4995ee7ea 100644 --- a/moses/Util.h +++ b/moses/Util.h @@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <cstdlib> #include <cstring> #include "util/exception.hh" +#include "util/string_stream.hh" #include "TypeDef.h" namespace Moses @@ -343,7 +344,7 @@ inline std::vector<std::string> TokenizeFirstOnly(const std::string& str, template <typename T> std::string Join(const std::string& delimiter, const std::vector<T>& items) { - std::ostringstream outstr; + util::StringStream outstr; if(items.size() == 0) return ""; outstr << items[0]; for(unsigned int i = 1; i < items.size(); i++) @@ -357,7 +358,7 @@ std::string Join(const std::string& delimiter, const std::vector<T>& items) template<typename It> std::string Join(const std::string &delim, It begin, It end) { - std::ostringstream outstr; + util::StringStream outstr; if (begin != end) outstr << *begin++; for ( ; begin != end; ++begin) |