mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-12 23:23:35 +00:00
fixing UUID issue
This commit is contained in:
@@ -16,8 +16,9 @@ namespace Scop
|
||||
|
||||
public:
|
||||
Narrator() : m_uuid(UUID()) {}
|
||||
Narrator(std::uint64_t uuid) : m_uuid(uuid) {}
|
||||
inline void AttachScript(std::shared_ptr<NarratorScript> script) { p_script = script; }
|
||||
[[nodiscard]] inline std::uint32_t GetUUID() const noexcept { return m_uuid; }
|
||||
[[nodiscard]] inline std::uint64_t GetUUID() const noexcept { return m_uuid; }
|
||||
inline ~Narrator()
|
||||
{
|
||||
if(p_script)
|
||||
@@ -37,5 +38,16 @@ namespace Scop
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct hash<Scop::Narrator>
|
||||
{
|
||||
std::size_t operator()(const Scop::Narrator& n) const noexcept
|
||||
{
|
||||
return static_cast<std::size_t>(n.GetUUID());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user