[Box Backup-commit] COMMIT r3136 - box/trunk/lib/common

subversion at boxbackup.org subversion at boxbackup.org
Thu Nov 8 00:33:20 GMT 2012


Author: chris
Date: 2012-11-08 00:33:20 +0000 (Thu, 08 Nov 2012)
New Revision: 3136

Modified:
   box/trunk/lib/common/MemBlockStream.cpp
   box/trunk/lib/common/MemBlockStream.h
Log:
Allow constructing an empty MemBlockStream, as it's useful for tests.


Modified: box/trunk/lib/common/MemBlockStream.cpp
===================================================================
--- box/trunk/lib/common/MemBlockStream.cpp	2012-11-07 23:14:01 UTC (rev 3135)
+++ box/trunk/lib/common/MemBlockStream.cpp	2012-11-08 00:33:20 UTC (rev 3136)
@@ -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 @@
 	ASSERT(mBytesInBuffer >= 0);
 }
 
-
 // --------------------------------------------------------------------------
 //
 // Function

Modified: box/trunk/lib/common/MemBlockStream.h
===================================================================
--- box/trunk/lib/common/MemBlockStream.h	2012-11-07 23:14:01 UTC (rev 3135)
+++ box/trunk/lib/common/MemBlockStream.h	2012-11-08 00:33:20 UTC (rev 3136)
@@ -27,6 +27,7 @@
 class MemBlockStream : public IOStream
 {
 public:
+	MemBlockStream();
 	MemBlockStream(const void *pBuffer, int Size);
 	MemBlockStream(const StreamableMemBlock &rBlock);
 	MemBlockStream(const CollectInBufferStream &rBuffer);




More information about the Boxbackup-commit mailing list