summaryrefslogtreecommitdiff
path: root/src/core/common/Rtti.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/common/Rtti.cpp')
-rw-r--r--src/core/common/Rtti.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/common/Rtti.cpp b/src/core/common/Rtti.cpp
index 5de2b4c..edfcda8 100644
--- a/src/core/common/Rtti.cpp
+++ b/src/core/common/Rtti.cpp
@@ -54,7 +54,7 @@ void RttiBase::initialize() const
initialized = true;
// Insert the parent types of the parent types and the aggregated types
- // if the parents
+ // of the parents
{
std::unordered_set<const RttiBase *> origParents = parents;
for (const RttiBase *parent : origParents) {
@@ -69,7 +69,8 @@ void RttiBase::initialize() const
parents.insert(this);
}
- // Insert the aggregated types of the aggregated types
+ // Insert the aggregated types of the aggregated types and the parents
+ // of each aggregated type
{
std::unordered_set<const RttiBase *> origAggregatedTypes =
aggregatedTypes;
@@ -90,7 +91,7 @@ bool RttiBase::isa(const RttiBase &other) const
return parents.count(&other) > 0;
}
-bool RttiBase::contains(const RttiBase &other) const
+bool RttiBase::aggregatedOf(const RttiBase &other) const
{
initialize();
return aggregatedTypes.count(&other) > 0;