diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-11-08 00:33:20 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-11-08 00:33:20 +0000 |
commit | 2dc7475929672f56a73f0e292e55678dd47986b2 (patch) | |
tree | f97d391b85f39cedd122e31430c67eeeb51a47a9 | |
parent | 16c360ee911b51b5c64bd25d48110a236ccc69fc (diff) |
Allow constructing an empty MemBlockStream, as it's useful for tests.
-rw-r--r-- | lib/common/MemBlockStream.cpp | 15 | ||||
-rw-r--r-- | lib/common/MemBlockStream.h | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/common/MemBlockStream.cpp b/lib/common/MemBlockStream.cpp index 538a7ef8..3a43a304 100644 --- a/lib/common/MemBlockStream.cpp +++ b/lib/common/MemBlockStream.cpp @@ -22,6 +22,20 @@ // // Function // Name: MemBlockStream::MemBlockStream() +// Purpose: Constructor with no contents +// Created: 2012/11/07 +// +// -------------------------------------------------------------------------- +MemBlockStream::MemBlockStream() +: mpBuffer(NULL), + mBytesInBuffer(0), + mReadPosition(0) +{ } + +// -------------------------------------------------------------------------- +// +// Function +// Name: MemBlockStream::MemBlockStream() // Purpose: Constructor (doesn't copy block, careful with lifetimes) // Created: 2003/09/05 // @@ -69,7 +83,6 @@ MemBlockStream::MemBlockStream(const CollectInBufferStream &rBuffer) ASSERT(mBytesInBuffer >= 0); } - // -------------------------------------------------------------------------- // // Function diff --git a/lib/common/MemBlockStream.h b/lib/common/MemBlockStream.h index 86c7739c..5234525b 100644 --- a/lib/common/MemBlockStream.h +++ b/lib/common/MemBlockStream.h @@ -27,6 +27,7 @@ class CollectInBufferStream; class MemBlockStream : public IOStream { public: + MemBlockStream(); MemBlockStream(const void *pBuffer, int Size); MemBlockStream(const StreamableMemBlock &rBlock); MemBlockStream(const CollectInBufferStream &rBuffer); |