From: Francis Dupont Date: Mon, 2 Aug 2021 14:53:14 +0000 (+0200) Subject: [#2011] Fixed override to build Kea X-Git-Tag: Kea-1.9.11~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83da9e463cc147001e2b0a08173d11ef6a893c33;p=thirdparty%2Fkea.git [#2011] Fixed override to build Kea --- diff --git a/src/lib/cc/data.h b/src/lib/cc/data.h index c22bc636a3..3859b3e013 100644 --- a/src/lib/cc/data.h +++ b/src/lib/cc/data.h @@ -703,21 +703,21 @@ public: MapElement(const Position& pos = ZERO_POSITION()) : Element(map, pos) {} // @todo should we have direct iterators instead of exposing the std::map // here? - const std::map& mapValue() const { + const std::map& mapValue() const override { return (m); } using Element::getValue; - bool getValue(std::map& t) const { + bool getValue(std::map& t) const override { t = m; return (true); } using Element::setValue; - bool setValue(const std::map& v) { + bool setValue(const std::map& v) override { m = v; return (true); } using Element::get; - ConstElementPtr get(const std::string& s) const { + ConstElementPtr get(const std::string& s) const override { auto found = m.find(s); return (found != m.end() ? found->second : ConstElementPtr()); } @@ -735,9 +735,9 @@ public: } using Element::set; - void set(const std::string& key, ConstElementPtr value); + void set(const std::string& key, ConstElementPtr value) override; using Element::remove; - void remove(const std::string& s) { m.erase(s); } + void remove(const std::string& s) override { m.erase(s); } /// @brief Remove the i-th element from the map. /// @@ -748,34 +748,34 @@ public: m.erase(it); } - bool contains(const std::string& s) const { + bool contains(const std::string& s) const override { return (m.find(s) != m.end()); } - void toJSON(std::ostream& ss) const; + void toJSON(std::ostream& ss) const override; // we should name the two finds better... // find the element at id; raises TypeError if one of the // elements at path except the one we're looking for is not a // mapelement. // returns an empty element if the item could not be found - ConstElementPtr find(const std::string& id) const; + ConstElementPtr find(const std::string& id) const override; // find the Element at 'id', and store the element pointer in t // returns true if found, or false if not found (either because // it doesn't exist or one of the elements in the path is not // a MapElement) - bool find(const std::string& id, ConstElementPtr& t) const; + bool find(const std::string& id, ConstElementPtr& t) const override; /// @brief Returns number of stored elements /// /// @return number of elements. - size_t size() const { + size_t size() const override { return (m.size()); } - bool equals(const Element& other) const; + bool equals(const Element& other) const override; - bool empty() const { return (m.empty()); } + bool empty() const override { return (m.empty()); } }; /// Checks whether the given ElementPtr is a NULL pointer