mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user