Commit a536d9ce authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5039] getNonConst method is now const.

parent 81f4dc50
...@@ -131,7 +131,7 @@ Element::get(const int) const { ...@@ -131,7 +131,7 @@ Element::get(const int) const {
} }
ElementPtr ElementPtr
Element::getNonConst(const int) { Element::getNonConst(const int) const {
throwTypeError("get(int) called on a non-list Element"); throwTypeError("get(int) called on a non-list Element");
} }
......
...@@ -281,7 +281,7 @@ public: ...@@ -281,7 +281,7 @@ public:
/// ///
/// \param i The position of the ElementPtr to retrieve /// \param i The position of the ElementPtr to retrieve
/// \return specified element pointer /// \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 /// Sets the ElementPtr at the given index. If the index is out
/// of bounds, this function throws an std::out_of_range exception. /// of bounds, this function throws an std::out_of_range exception.
...@@ -633,7 +633,7 @@ public: ...@@ -633,7 +633,7 @@ public:
} }
using Element::get; using Element::get;
ConstElementPtr get(int i) const { return (l.at(i)); } 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; using Element::set;
void set(size_t i, ElementPtr e) { void set(size_t i, ElementPtr e) {
l.at(i) = e; l.at(i) = e;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment