feat(datastore): add getter and setter for size

This commit is contained in:
fallenoak 2023-02-25 10:18:54 -06:00
parent 08725b8455
commit f98814690c
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
3 changed files with 38 additions and 0 deletions

View file

@ -346,6 +346,14 @@ CDataStore& CDataStore::Set(uint32_t pos, uint16_t val) {
return *this;
}
void CDataStore::SetSize(uint32_t size) {
this->m_size = size;
}
uint32_t CDataStore::Size() {
return this->m_size;
}
bool CDataStore::Sub8CBBF0(uint32_t a2) {
return this->m_read <= this->m_size && this->m_size - this->m_read >= a2;
}

View file

@ -46,6 +46,8 @@ class CDataStore {
CDataStore& PutData(const void* val, uint32_t bytes);
CDataStore& PutString(const char* val);
CDataStore& Set(uint32_t pos, uint16_t val);
void SetSize(uint32_t size);
uint32_t Size();
bool Sub8CBBF0(uint32_t a2);
};