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
path: root/lm
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-10-03 02:33:38 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-16 22:03:22 +0300
commitb6231e8c73dee466f87f28c6d7afb34d51866169 (patch)
treea5f908bcf37e8e823698da018b2b3059ed453f75 /lm
parentdcea021cd7c6b1669a26d0808775c267972d595a (diff)
make util::StringStream more like std::stringstream
Diffstat (limited to 'lm')
-rw-r--r--lm/filter/arpa_io.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/lm/filter/arpa_io.cc b/lm/filter/arpa_io.cc
index 2cae60f9a..cf2721ed5 100644
--- a/lm/filter/arpa_io.cc
+++ b/lm/filter/arpa_io.cc
@@ -33,10 +33,9 @@ template <class Stream> void WriteCounts(Stream &out, const std::vector<uint64_t
}
size_t SizeNeededForCounts(const std::vector<uint64_t> &number) {
- std::string buf;
- util::StringStream stream(buf);
+ util::StringStream stream;
WriteCounts(stream, number);
- return buf.size();
+ return stream.str().size();
}
bool IsEntirelyWhiteSpace(const StringPiece &line) {