diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-20 12:51:10 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-20 12:51:10 +0100 |
commit | 86f911a8a068059db9a30b36738172339d011860 (patch) | |
tree | 0b6cd62b7f68e486c558a99a535f7b7595139c7e | |
parent | 4bef3b094733b38bf75f2a1837d353f5c09bec00 (diff) |
added a const where it was possible.
-rw-r--r-- | src/core/model/Document.cpp | 2 | ||||
-rw-r--r-- | src/core/model/Document.hpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp index ec58141..7552bd3 100644 --- a/src/core/model/Document.cpp +++ b/src/core/model/Document.cpp @@ -550,7 +550,7 @@ void Document::addAnnotation(Handle<AnnotationEntity> a) } } -void Document::addAnnotations(std::vector<Handle<AnnotationEntity>> as) +void Document::addAnnotations(const std::vector<Handle<AnnotationEntity>> &as) { for (Handle<AnnotationEntity> a : as) { addAnnotation(a); diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index 5d5879e..a7dee25 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -279,6 +279,7 @@ public: * * This method also changes the parent of the newly added StructureNode if * it is not set to this DocumentEntity already. + * TODO: This could get move semantics. * * @param s is the StructureNode that shall be added. * @param fieldName is the name of a field as specified in the @@ -690,7 +691,7 @@ public: * * @param as is a vector of AnnotationEntities. */ - void addAnnotations(std::vector<Handle<AnnotationEntity>> as); + void addAnnotations(const std::vector<Handle<AnnotationEntity>>& as); /** * Returns a const reference to the NodeVector of Domains that are used |