From 73aa1e763eeb631eaaf23c236d263832678314c4 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 15 Mar 2015 13:59:44 +0100 Subject: Fix getFieldDescriptor with index ignoring inherited fields --- src/core/model/Ontology.hpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/core/model/Ontology.hpp') diff --git a/src/core/model/Ontology.hpp b/src/core/model/Ontology.hpp index 8d6e596..cb314cc 100644 --- a/src/core/model/Ontology.hpp +++ b/src/core/model/Ontology.hpp @@ -681,22 +681,15 @@ public: Rooted getFieldDescriptor( const std::string &name = DEFAULT_FIELD_NAME) const; - /** * Returns the FieldDescriptor with the given index. * - * @param index the index of the field that should be retrieved. + * @param idx the index of the field that should be retrieved. - * @return the FieldDescriptor with the given index or a nullptr if no - * such FieldDescriptor was found. + * @return the FieldDescriptor with the given index or a nullptr if no + * such FieldDescriptor was found. */ - Rooted getFieldDescriptor(size_t index) const - { - if (index < fieldDescriptors.size()) { - return fieldDescriptors[index]; - } - return nullptr; - } + Rooted getFieldDescriptor(size_t idx) const; /** * This returns true if this Descriptor has a FieldDescriptor with the -- cgit v1.2.3