summaryrefslogtreecommitdiff
path: root/src/core/model/Document.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-12 02:50:18 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:15 +0200
commitc7cb92f43f97ef5558eee0d7be6f18192134f3ec (patch)
tree6475300d3f1ad862a7d4e4514084770e33ce2775 /src/core/model/Document.cpp
parentc917381e5eb5700326d2389ffe0874565fc970ac (diff)
Replace NodeVector by ManagedVector where NodeVector functionality is not needed. Reduces calls to "Manager.registerEvent" to <10% of original value
Diffstat (limited to 'src/core/model/Document.cpp')
-rw-r--r--src/core/model/Document.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp
index 894330b..411a755 100644
--- a/src/core/model/Document.cpp
+++ b/src/core/model/Document.cpp
@@ -93,7 +93,8 @@ bool DocumentEntity::doValidate(Logger &logger) const
* gather all fields of superclasses as well, that have not been
* overridden in the subclasses.
*/
- NodeVector<FieldDescriptor> fieldDescs = descriptor->getFieldDescriptors();
+ ManagedVector<FieldDescriptor> fieldDescs =
+ descriptor->getFieldDescriptors();
// iterate over every field
for (unsigned int f = 0; f < fields.size(); f++) {
// we have a special check for primitive fields.
@@ -137,9 +138,9 @@ bool DocumentEntity::doValidate(Logger &logger) const
std::unordered_set<StructuredClass *> childClasses;
{
- NodeVector<StructuredClass> tmp =
+ ManagedVector<StructuredClass> tmp =
fieldDescs[f]->getChildrenWithSubclasses();
- for (auto s : tmp) {
+ for (const auto &s : tmp) {
childClasses.insert(s.get());
}
}
@@ -999,4 +1000,4 @@ const Rtti AnnotationEntity =
.parent(&Node)
.composedOf({&StructuredEntity, &DocumentPrimitive, &Anchor});
}
-} \ No newline at end of file
+}