From: bert hubert Date: Tue, 1 Dec 2015 16:38:38 +0000 (+0100) Subject: const correctness for sortlist comparator X-Git-Tag: dnsdist-1.0.0-alpha1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19ad55336f6d2aa561bf814feac344d2e7838c3a;p=thirdparty%2Fpdns.git const correctness for sortlist comparator --- diff --git a/pdns/sortlist.cc b/pdns/sortlist.cc index 0a36fa29f3..4a014f04d7 100644 --- a/pdns/sortlist.cc +++ b/pdns/sortlist.cc @@ -29,7 +29,7 @@ void SortList::addEntry(const Netmask& formask, const Netmask& valmask, int orde d_sortlist.insert(formask).second.d_orders.insert(valmask).second=order; } -std::unique_ptr SortList::getOrderCmp(const ComboAddress& who) +std::unique_ptr SortList::getOrderCmp(const ComboAddress& who) const { if(!d_sortlist.match(who)) { return std::unique_ptr(); diff --git a/pdns/sortlist.hh b/pdns/sortlist.hh index afe67c16cb..f9524a5179 100644 --- a/pdns/sortlist.hh +++ b/pdns/sortlist.hh @@ -21,7 +21,7 @@ public: void clear(); void addEntry(const Netmask& covers, const Netmask& answermask, int order=-1); int getMaxOrder(const Netmask& formask) const; - std::unique_ptr getOrderCmp(const ComboAddress& who); + std::unique_ptr getOrderCmp(const ComboAddress& who) const; private: NetmaskTree d_sortlist;