start buffer test

This commit is contained in:
2023-10-09 05:00:38 -07:00
parent 96febb88ec
commit b05cf56b1a
3 changed files with 37 additions and 31 deletions

View File

@@ -18,7 +18,7 @@ public:
Buffer(const char *);
uint8_t *Contents() { return this->contents; }
size_t Size() { return this->size; };
size_t Size() { return this->length; };
size_t Capacity() { return this->capacity; }
bool Append(uint8_t *data, size_t datalen);
@@ -35,7 +35,7 @@ public:
void Reclaim();
private:
bool mustGrow(size_t delta);
size_t mustGrow(size_t delta);
bool shift(size_t offset, size_t delta);
uint8_t *contents;