]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5039] getNonConst method is now const.
authorTomek Mrugalski <tomasz@isc.org>
Thu, 22 Dec 2016 18:35:04 +0000 (19:35 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 22 Dec 2016 18:35:04 +0000 (19:35 +0100)
src/lib/cc/data.cc
src/lib/cc/data.h

index fde27e757119e4921aca7c3ae6cd9e8cd6d28d0f..260a08dc76a1158c2ba6f3f596a06b8e4759bc2b 100644 (file)
@@ -131,7 +131,7 @@ Element::get(const int) const {
 }
 
 ElementPtr
-Element::getNonConst(const int) {
+Element::getNonConst(const int) const {
     throwTypeError("get(int) called on a non-list Element");
 }
 
index 41c6ee301334e11af00e70485bb87c3e9535c28d..22c9a999e6456a713f2e73c9fba4d3967c70bf79 100644 (file)
@@ -281,7 +281,7 @@ public:
     ///
     /// \param i The position of the ElementPtr to retrieve
     /// \return specified element pointer
-    virtual ElementPtr getNonConst(const int i);
+    virtual ElementPtr getNonConst(const int i) const;
 
     /// Sets the ElementPtr at the given index. If the index is out
     /// of bounds, this function throws an std::out_of_range exception.
@@ -633,7 +633,7 @@ public:
     }
     using Element::get;
     ConstElementPtr get(int i) const { return (l.at(i)); }
-    ElementPtr getNonConst(int i)  { return (l.at(i)); }
+    ElementPtr getNonConst(int i) const  { return (l.at(i)); }
     using Element::set;
     void set(size_t i, ElementPtr e) {
         l.at(i) = e;