aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/Buffer.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-06-24 00:06:25 +0800
committercrupest <crupest@outlook.com>2024-06-25 00:12:29 +0800
commit807c1dfe8a897f9c61bf3549ff2566917b53023b (patch)
tree8f0bfed314747ff570fa99577e8954060194ed7f /include/cru/common/Buffer.h
parent2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a (diff)
downloadcru-807c1dfe8a897f9c61bf3549ff2566917b53023b.tar.gz
cru-807c1dfe8a897f9c61bf3549ff2566917b53023b.tar.bz2
cru-807c1dfe8a897f9c61bf3549ff2566917b53023b.zip
feat: fix linux build, complete PosixSpawnSubProcess.
NEED TEST: BufferStream, AutoReadStream, SubProcess.
Diffstat (limited to 'include/cru/common/Buffer.h')
-rw-r--r--include/cru/common/Buffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cru/common/Buffer.h b/include/cru/common/Buffer.h
index 2c3b7b87..bc2e2a26 100644
--- a/include/cru/common/Buffer.h
+++ b/include/cru/common/Buffer.h
@@ -91,6 +91,8 @@ class Buffer final {
Index PushBack(const std::byte* other, Index other_size,
bool use_memmove = false);
+ void PushBackCount(Index count);
+
/**
* @brief Move forward the used-begin ptr.
* @return The actual size moved forward.
@@ -146,6 +148,8 @@ class Buffer final {
void Move_(Buffer&& other) noexcept;
void Delete_() noexcept;
+ void AssertValid();
+
private:
std::byte* ptr_;
Index size_;