Skip to content

Commit

Permalink
Merge pull request #1669 from RommelVR/patch-1
Browse files Browse the repository at this point in the history
Updates MemoryStream.reserve DDOC
  • Loading branch information
monarchdodra committed Dec 25, 2013
2 parents 9eb536c + 18b0a17 commit e2e3793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/stream.d
Expand Up @@ -2675,7 +2675,7 @@ class MemoryStream: TArrayStream!(ubyte[]) {
this(byte[] buf) { this(cast(ubyte[]) buf); } /// ditto
this(char[] buf) { this(cast(ubyte[]) buf); } /// ditto

/// Ensure the stream can hold count bytes.
/// Ensure the stream can write count extra bytes from cursor position without an allocation.
void reserve(size_t count) {
if (cur + count > buf.length)
buf.length = cast(uint)((cur + count) * 2);
Expand Down

0 comments on commit e2e3793

Please sign in to comment.