From 9b2df60b682c09f46f77e23e59100b6fbbd03795 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 13 Jan 2021 14:48:29 +0100 Subject: [PATCH] Clarify entity operator overloads --- inferno/src/inferno/scene/entity.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inferno/src/inferno/scene/entity.h b/inferno/src/inferno/scene/entity.h index 7283ff7..c29064f 100644 --- a/inferno/src/inferno/scene/entity.h +++ b/inferno/src/inferno/scene/entity.h @@ -54,10 +54,12 @@ namespace Inferno { return m_registry.lock()->get_or_emplace(m_entity, std::forward

(parameters)...); } + // Casts inline operator bool() const { return m_entity != entt::null; } inline operator entt::entity() const { return m_entity; } inline operator uint32_t() const { return static_cast(m_entity); } - inline uint32_t operator ()() const { return static_cast(m_entity); } // () + // Functor() + inline uint32_t operator ()() const { return static_cast(m_entity); } private: entt::entity m_entity = entt::null;