fix(gameplay): use inline const for static EMPTY members

Use inline const for static EMPTY members to avoid ODR and linker issues.
Add missing block_manager.hpp includes in gameplay sources.
This commit is contained in:
2026-08-04 16:20:16 +08:00
parent 0259ca71ce
commit 8af30e159d
8 changed files with 8 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ private:
using IDMap = tbb::concurrent_hash_map<std::string, BlockType>;
using CrossPlaneMap = tbb::concurrent_hash_map<BlockType, BlockType>;
static const BlockData EMPTY;
static inline const BlockData EMPTY;
static inline BlockMap m_datas;
static inline IDMap m_id_map;

View File

@@ -34,6 +34,6 @@ private:
IDMap m_id_map;
BlockToIDMap m_block_to_id_map;
static constexpr ItemData EMPTY;
static inline const ItemData EMPTY;
};
} // namespace Cubed