- optimized the FName versions of IsDescendantOf and IsKindOf. These can be done without first looking up the class type itself.
This commit is contained in:
parent
31223ca180
commit
a6785afddb
28 changed files with 126 additions and 97 deletions
|
|
@ -458,6 +458,7 @@ public:
|
|||
virtual ~DObject ();
|
||||
|
||||
inline bool IsKindOf (const PClass *base) const;
|
||||
inline bool IsKindOf(FName base) const;
|
||||
inline bool IsA (const PClass *type) const;
|
||||
|
||||
void SerializeUserVars(FSerializer &arc);
|
||||
|
|
@ -615,6 +616,11 @@ inline bool DObject::IsKindOf (const PClass *base) const
|
|||
return base->IsAncestorOf (GetClass ());
|
||||
}
|
||||
|
||||
inline bool DObject::IsKindOf(FName base) const
|
||||
{
|
||||
return GetClass()->IsDescendantOf(base);
|
||||
}
|
||||
|
||||
inline bool DObject::IsA (const PClass *type) const
|
||||
{
|
||||
return (type == GetClass());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue