chore(datastore): clean up getter for data at offset

This commit is contained in:
fallenoak 2023-01-08 13:59:46 -06:00
parent 42f36f2888
commit 42384cbf77
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

View file

@ -75,12 +75,13 @@ void CDataStore::GetBufferParams(const void** data, uint32_t* size, uint32_t* al
CDataStore& CDataStore::GetDataInSitu(void*& val, uint32_t bytes) { CDataStore& CDataStore::GetDataInSitu(void*& val, uint32_t bytes) {
STORM_ASSERT(this->IsFinal()); STORM_ASSERT(this->IsFinal());
// TODO FetchRead if (this->FetchRead(this->m_read, bytes)) {
auto ofs = this->m_read - this->m_base; auto ofs = this->m_read - this->m_base;
val = &this->m_data[ofs]; auto ptr = &this->m_data[ofs];
val = ptr;
this->m_read += bytes; this->m_read += bytes;
}
return *this; return *this;
} }