Skip to content

Commit

Permalink
fix: clear target string before parse (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
jl2922 authored May 14, 2018
1 parent 71a3205 commit 3219b05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hps.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ T from_stream(std::istream& stream) {
// Recommended for repeated use inside a loop.
template <class T>
void to_string(const T& t, std::string& str) {
str.clear();
StringOutputBuffer ob(str);
ob << t;
ob.flush();
Expand Down

0 comments on commit 3219b05

Please sign in to comment.