feat(big): add SBigMul

This commit is contained in:
fallenoak 2023-01-30 00:10:52 -06:00 committed by GitHub
parent e74654800d
commit 6e96e0a767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 179 additions and 0 deletions

View file

@ -32,3 +32,15 @@ int32_t BigBuffer::IsUsed(uint32_t index) const {
void BigBuffer::SetCount(uint32_t count) {
this->m_data.SetCount(this->m_offset + count);
}
void BigBuffer::Trim() const {
while (this->Count()) {
auto& data = const_cast<TSGrowableArray<uint32_t>&>(this->m_data);
if (*data.Top()) {
break;
}
data.SetCount(data.Count() - 1);
}
}