Skip to content

Commit f607156

Browse files
committed
fix compile error
1 parent d4c8350 commit f607156

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/co/fast.h

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ class __coapi stream {
123123
_p = cap > 0 ? (char*)co::alloc(cap) : 0;
124124
}
125125

126+
stream(char* p, size_t cap, size_t size)
127+
: _cap(cap), _size(size), _p(p) {
128+
}
129+
126130
~stream() { this->reset(); }
127131

128132
stream(const stream&) = delete;

include/co/fastring.h

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class __coapi fastring : public fast::stream {
4141
memset(_p, c, n);
4242
}
4343

44+
fastring(char* p, size_t cap, size_t size)
45+
: fast::stream(p, cap, size) {
46+
}
47+
4448
fastring(const void* s, size_t n)
4549
: fast::stream(n + !!n, n) {
4650
memcpy(_p, s, n);

0 commit comments

Comments
 (0)