From 04248309bdedb58be2fe1aa1fad0342ac936b541 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sat, 20 Dec 2014 00:16:37 +0100 Subject: improved RTTI system --- src/core/managed/Managed.hpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core/managed/Managed.hpp') diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp index 4818c3d..cc55ae0 100644 --- a/src/core/managed/Managed.hpp +++ b/src/core/managed/Managed.hpp @@ -114,19 +114,19 @@ public: * @return a reference to the registered ManagedType for this particular * Managed class. */ - const ManagedType& type() const { - return ManagedType::typeOf(typeid(*this)); + const ManagedType &type() const + { + return ManagedType::typeOf(*this); } /** * Returns true if this Managed instance is of the given ManagedType. * * @param true if the ManagedType registered for this particular Managed - * class is + * class is of the given type or one of the registered parent types is of + * the given type. */ - bool isa(const ManagedType &t) const { - return type().isa(t); - } + bool isa(const ManagedType &t) const { return type().isa(t); } }; /** @@ -512,7 +512,6 @@ public: */ Managed *getOwner() const { return owner; } }; - } #endif /* _OUSIA_MANAGED_HPP_ */ -- cgit v1.2.3