summaryrefslogtreecommitdiff
path: root/src/accum.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-13 00:42:25 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 00:42:25 -0400
commit40f553228f5a28034c6635fdcb4c86af28a385ed (patch)
tree2c40305c9f9841a4c3d453a4a5c49ec69056b4b2 /src/accum.h
parent556211e623cad88213e5087b5c9c36e754d9aa02 (diff)
parentb1b4e2aadff5983d443d70c09ea86a41b015873f (diff)
downloadfork-ledger-40f553228f5a28034c6635fdcb4c86af28a385ed.tar.gz
fork-ledger-40f553228f5a28034c6635fdcb4c86af28a385ed.tar.bz2
fork-ledger-40f553228f5a28034c6635fdcb4c86af28a385ed.zip
Merge branch 'next'
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