summaryrefslogtreecommitdiff
path: root/src/pstream.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-20 02:10:40 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-20 02:10:40 -0500
commit22505d9527edce59cd3cf90c5241e4bd809eb8a2 (patch)
treed943b2dba416a9fbe8619e02a293dfd854fd0869 /src/pstream.h
parentdf11ecbbd733068284a19369949bcaa20b0e6e76 (diff)
downloadfork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.tar.gz
fork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.tar.bz2
fork-ledger-22505d9527edce59cd3cf90c5241e4bd809eb8a2.zip
Always call TRACE_CTOR at the end of constructors
Diffstat (limited to 'src/pstream.h')
-rw-r--r--src/pstream.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pstream.h b/src/pstream.h
index dfb27056..6e38158a 100644
--- a/src/pstream.h
+++ b/src/pstream.h
@@ -58,14 +58,14 @@ class ptristream : public std::istream
public:
ptrinbuf(char * _ptr, std::size_t _len) : ptr(_ptr), len(_len) {
- TRACE_CTOR(ptrinbuf, "char *, std::size_t");
-
if (*ptr && len == 0)
len = std::strlen(ptr);
- setg(ptr, // beginning of putback area
- ptr, // read position
+ setg(ptr, // beginning of putback area
+ ptr, // read position
ptr+len); // end position
+
+ TRACE_CTOR(ptrinbuf, "char *, std::size_t");
}
~ptrinbuf() throw() {
TRACE_DTOR(ptrinbuf);