From 19ad55336f6d2aa561bf814feac344d2e7838c3a Mon Sep 17 00:00:00 2001 From: bert hubert Date: Tue, 1 Dec 2015 17:38:38 +0100 Subject: [PATCH] const correctness for sortlist comparator --- pdns/sortlist.cc | 2 +- pdns/sortlist.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/sortlist.cc b/pdns/sortlist.cc index 0a36fa29f..4a014f04d 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 afe67c16c..f9524a517 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; -- 2.40.0