summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-11-08 00:33:20 +0000
committerChris Wilson <chris+github@qwirx.com>2012-11-08 00:33:20 +0000
commit2dc7475929672f56a73f0e292e55678dd47986b2 (patch)
treef97d391b85f39cedd122e31430c67eeeb51a47a9 /lib
parent16c360ee911b51b5c64bd25d48110a236ccc69fc (diff)
Allow constructing an empty MemBlockStream, as it's useful for tests.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/MemBlockStream.cpp15
-rw-r--r--lib/common/MemBlockStream.h1
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);