summaryrefslogtreecommitdiff
path: root/src/accum.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/accum.h')
-rw-r--r--src/accum.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/accum.h b/src/accum.h
index 94e79948..236a7714 100644
--- a/src/accum.h
+++ b/src/accum.h
@@ -47,7 +47,7 @@ namespace ledger {
class straccbuf : public std::streambuf
{
protected:
- std::string str; // accumulator
+ std::string str; // accumulator
std::string::size_type index;
public:
@@ -70,6 +70,8 @@ public:
}
void clear() {
+ std::ostream::clear();
+ buf.pubseekoff(0, ios_base::beg);
buf.str.clear();
buf.index = 0;
}
@@ -79,7 +81,7 @@ public:
}
};
-#define ACCUM(obj) (static_cast<straccstream&>(obj).str())
+#define ACCUM(obj) (static_cast<const straccstream&>(obj).str())
} // namespace ledger