Browse Source

Clarify entity operator overloads

master
Riyyi 4 years ago
parent
commit
9b2df60b68
  1. 4
      inferno/src/inferno/scene/entity.h

4
inferno/src/inferno/scene/entity.h

@ -54,10 +54,12 @@ namespace Inferno {
return m_registry.lock()->get_or_emplace<T>(m_entity, std::forward<P>(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<uint32_t>(m_entity); }
inline uint32_t operator ()() const { return static_cast<uint32_t>(m_entity); } // ()
// Functor()
inline uint32_t operator ()() const { return static_cast<uint32_t>(m_entity); }
private:
entt::entity m_entity = entt::null;

Loading…
Cancel
Save