mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
rename StructMapping to StructLayout
This commit is contained in:
parent
d0bc679815
commit
bcd6f40ddb
5 changed files with 63 additions and 60 deletions
|
|
@ -22,7 +22,8 @@ namespace util {
|
|||
|
||||
/// @brief Find current entry address by index
|
||||
/// @param index entry index
|
||||
/// @return nullptr if entry does not exists
|
||||
/// @return temporary raw pointer or nullptr if entry does not exists
|
||||
/// @attention pointer becomes invalid after allocate(...) or free(...)
|
||||
uint8_t* find(Tindex index) {
|
||||
auto data = buffer.data();
|
||||
for (size_t i = 0; i < entriesCount; i++) {
|
||||
|
|
@ -60,7 +61,7 @@ namespace util {
|
|||
/// @param index entry index
|
||||
/// @param size entry size
|
||||
/// @return temporary entry pointer
|
||||
/// (invalid after next allocate(...) or free(...))
|
||||
/// @attention pointer becomes invalid after allocate(...) or free(...)
|
||||
uint8_t* allocate(Tindex index, Tsize size) {
|
||||
if (size == 0) {
|
||||
throw std::runtime_error("size is 0");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue