hash Struct Template
Hash specialization for EntityHandle. More...
Declaration
struct std::hash<helios::engine::ecs::EntityHandle> { ... }
Public Operators Index
| std::size_t | operator() (const helios::engine::ecs::EntityHandle &handle) const noexcept |
Description
Hash specialization for EntityHandle.
Packs entityId and versionId into a 64-bit value for hashing.
Definition at line 87 of file EntityHandle.ixx.
Public Operators
operator()()
| inline noexcept |
Definition at line 88 of file EntityHandle.ixx.
88 std::size_t operator()(const helios::engine::ecs::EntityHandle& handle) const noexcept {
89
90 const uint64_t packed = (static_cast<uint64_t>(handle.entityId) << 32) |
91 static_cast<uint64_t>(handle.versionId);
92
93 return std::hash<uint64_t>{}(packed);
94 }
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.