Compare commits

..

2 Commits

Author SHA1 Message Date
cat
12796fa31b CreateEntity should be nodiscard 2026-01-28 13:47:28 +02:00
cat
c1637a2a2e Hashes on dualkey map need to be also const 2026-01-28 13:47:07 +02:00
2 changed files with 3 additions and 2 deletions

View File

@@ -200,8 +200,8 @@ private:
firstKey(std::move(firstKey)), secondKey(std::move(secondKey)),
value(std::move(value)) {}
std::size_t firstKeyHash = 0;
std::size_t secondKeyHash = 0;
const std::size_t firstKeyHash;
const std::size_t secondKeyHash;
const AKey firstKey;
const BKey secondKey;
mutable Value value;

View File

@@ -40,6 +40,7 @@ concept Component = std::derived_from<T, BaseComponent>;
class World {
public:
// Entity
[[nodiscard]]
Entity CreateEntity();
bool EntityExists(const Entity &entity) noexcept;
[[nodiscard("It is not guaranteed that an entity can always be destroyed, "