feat(big): add BigBuffer::SetOffset

This commit is contained in:
fallenoak 2023-02-03 15:07:55 -06:00
parent 69cf4739f3
commit 60edadfe06
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
2 changed files with 9 additions and 0 deletions

View file

@ -33,6 +33,14 @@ void BigBuffer::SetCount(uint32_t count) {
this->m_data.SetCount(this->m_offset + count);
}
void BigBuffer::SetOffset(uint32_t offset) {
this->m_offset = offset;
if (offset) {
this->GrowToFit(0xFFFFFFFF);
}
}
void BigBuffer::Trim() const {
while (this->Count()) {
auto& data = const_cast<TSGrowableArray<uint32_t>&>(this->m_data);