diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-03 02:33:38 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-16 22:03:22 +0300 |
commit | b6231e8c73dee466f87f28c6d7afb34d51866169 (patch) | |
tree | a5f908bcf37e8e823698da018b2b3059ed453f75 /lm | |
parent | dcea021cd7c6b1669a26d0808775c267972d595a (diff) |
make util::StringStream more like std::stringstream
Diffstat (limited to 'lm')
-rw-r--r-- | lm/filter/arpa_io.cc | 5 |
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) { |