@@ -16240,11 +16240,9 @@ namespace gaia {
16240
16240
/*** Start of inlined file: chunk_allocator.h ***/
16241
16241
#pragma once
16242
16242
16243
+ #include <cinttypes>
16243
16244
#include <cstdint>
16244
16245
16245
- #if GAIA_ECS_CHUNK_ALLOCATOR
16246
- #include <cinttypes>
16247
-
16248
16246
16249
16247
/*** Start of inlined file: dyn_singleton.h ***/
16250
16248
#pragma once
@@ -16321,8 +16319,6 @@ namespace gaia {
16321
16319
16322
16320
/*** End of inlined file: common.h ***/
16323
16321
16324
- #endif
16325
-
16326
16322
namespace gaia {
16327
16323
namespace ecs {
16328
16324
//! Size of one allocated block of memory
@@ -16363,7 +16359,7 @@ namespace gaia {
16363
16359
16364
16360
//! Allocator for ECS Chunks. Memory is organized in pages of chunks.
16365
16361
class ChunkAllocatorImpl {
16366
- friend gaia::ecs::ChunkAllocator;
16362
+ friend :: gaia::ecs::ChunkAllocator;
16367
16363
16368
16364
struct MemoryPage {
16369
16365
static constexpr uint16_t NBlocks = 62;
@@ -16675,17 +16671,20 @@ namespace gaia {
16675
16671
}
16676
16672
16677
16673
private:
16674
+ static constexpr const char* s_strChunkAlloc_Chunk = "Chunk";
16675
+ static constexpr const char* s_strChunkAlloc_MemPage = "MemoryPage";
16676
+
16678
16677
static MemoryPage* alloc_page(uint8_t sizeType) {
16679
16678
const uint32_t size = mem_block_size(sizeType) * MemoryPage::NBlocks;
16680
- auto* pPageData = mem::AllocHelper::alloc_alig<uint8_t>("Chunk" , 16U, size);
16681
- auto* pMemoryPage = mem::AllocHelper::alloc<MemoryPage>("MemoryPage" );
16679
+ auto* pPageData = mem::AllocHelper::alloc_alig<uint8_t>(s_strChunkAlloc_Chunk , 16U, size);
16680
+ auto* pMemoryPage = mem::AllocHelper::alloc<MemoryPage>(s_strChunkAlloc_MemPage );
16682
16681
return new (pMemoryPage) MemoryPage(pPageData, sizeType);
16683
16682
}
16684
16683
16685
16684
static void free_page(MemoryPage* pMemoryPage) {
16686
- mem::AllocHelper::free_alig("Chunk" , pMemoryPage->m_data);
16685
+ mem::AllocHelper::free_alig(s_strChunkAlloc_Chunk , pMemoryPage->m_data);
16687
16686
pMemoryPage->~MemoryPage();
16688
- mem::AllocHelper::free("MemoryPage" , pMemoryPage);
16687
+ mem::AllocHelper::free(s_strChunkAlloc_MemPage , pMemoryPage);
16689
16688
}
16690
16689
16691
16690
void done() {
@@ -18034,7 +18033,7 @@ namespace gaia {
18034
18033
18035
18034
//! Updates the version numbers for this chunk.
18036
18035
void update_versions() {
18037
- update_version(m_header.worldVersion);
18036
+ ::gaia::ecs:: update_version(m_header.worldVersion);
18038
18037
update_world_version();
18039
18038
}
18040
18039
@@ -18215,7 +18214,7 @@ namespace gaia {
18215
18214
++m_header.countEnabled;
18216
18215
entity_view_mut()[row] = entity;
18217
18216
18218
- update_version(m_header.worldVersion);
18217
+ ::gaia::ecs:: update_version(m_header.worldVersion);
18219
18218
update_world_version();
18220
18219
18221
18220
return row;
@@ -18704,7 +18703,7 @@ namespace gaia {
18704
18703
"Set providing a row can only be used with generic components");
18705
18704
18706
18705
// Update the world version
18707
- update_version(m_header.worldVersion);
18706
+ ::gaia::ecs:: update_version(m_header.worldVersion);
18708
18707
18709
18708
GAIA_ASSERT(row < m_header.capacity);
18710
18709
return view_mut<T>()[row];
@@ -18725,7 +18724,7 @@ namespace gaia {
18725
18724
GAIA_ASSERT(type.kind() == entity_kind_v<T>);
18726
18725
18727
18726
// Update the world version
18728
- update_version(m_header.worldVersion);
18727
+ ::gaia::ecs:: update_version(m_header.worldVersion);
18729
18728
18730
18729
GAIA_ASSERT(row < m_header.capacity);
18731
18730
@@ -18939,7 +18938,7 @@ namespace gaia {
18939
18938
//! Returns true if the provided version is newer than the one stored internally
18940
18939
GAIA_NODISCARD bool changed(uint32_t version, uint32_t compIdx) const {
18941
18940
auto versions = comp_version_view();
18942
- return version_changed(versions[compIdx], version);
18941
+ return ::gaia::ecs:: version_changed(versions[compIdx], version);
18943
18942
}
18944
18943
18945
18944
//! Update the version of a component at the index \param compIdx
@@ -23359,7 +23358,7 @@ namespace gaia {
23359
23358
template <typename TIter, typename Func>
23360
23359
void run_query_on_chunks(QueryInfo& queryInfo, Func func) {
23361
23360
// Update the world version
23362
- update_version(*m_worldVersion);
23361
+ ::gaia::ecs:: update_version(*m_worldVersion);
23363
23362
23364
23363
const bool hasFilters = queryInfo.has_filters();
23365
23364
if (hasFilters)
0 commit comments