Skip to content

Commit bece7e0

Browse files
committed
Add constructors
1 parent e886111 commit bece7e0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/xtd.core/include/xtd/io/memory_stream.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ namespace xtd {
3838
/// @remarks The xtd::io::memory_stream::can_read, xtd::io::memory_stream::can_seek, and xtd::io::memory_stream::can_write properties are all set to true.
3939
/// @remarks The capacity of the current stream automatically increases when you use the xtd::io::memory_stream::set_length method to set the length to a value larger than the capacity of the current stream.
4040
/// @remarks This constructor exposes the underlying stream, which xtd::io::memory_stream::get_buffer returns.
41-
memory_stream() {}
41+
memory_stream();
42+
memory_stream(xtd::size capacity);
4243
/// @}
4344

4445
/// @name Public Properties

src/xtd.core/src/xtd/io/memory_stream.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
using namespace xtd;
55
using namespace xtd::io;
66

7+
memory_stream::memory_stream() {
8+
}
9+
10+
memory_stream::memory_stream(xtd::size capacity) {
11+
this->capacity(capacity);
12+
}
13+
714
bool memory_stream::can_read() const noexcept {
815
return true;
916
}

0 commit comments

Comments
 (0)