mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +00:00
feat(big): add BigBuffer::SetOffset
This commit is contained in:
parent
69cf4739f3
commit
60edadfe06
2 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue