From fe3b0645c47f279f7243ecb9826ed911d2ecaa50 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 19 Apr 2021 12:28:55 +0200 Subject: [PATCH] auth: Small cleanup in SimpleMatch --- pdns/misc.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pdns/misc.hh b/pdns/misc.hh index 38f06bc1b5..9b19924292 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -489,7 +489,7 @@ public: { } - bool match(string::const_iterator mi, string::const_iterator mend, string::const_iterator vi, string::const_iterator vend) + bool match(string::const_iterator mi, string::const_iterator mend, string::const_iterator vi, string::const_iterator vend) const { for(;;++mi) { if (mi == mend) { @@ -499,7 +499,7 @@ public: ++vi; } else if (*mi == '*') { while(mi != mend && *mi == '*') ++mi; - if (mi == d_mask.end()) return true; + if (mi == mend) return true; while(vi != vend) { if (match(mi,mend,vi,vend)) return true; ++vi; @@ -518,17 +518,17 @@ public: } } - bool match(const string& value) { + bool match(const string& value) const { return match(d_mask.begin(), d_mask.end(), value.begin(), value.end()); } - bool match(const DNSName& name) { + bool match(const DNSName& name) const { return match(name.toStringNoDot()); } private: - string d_mask; - bool d_fold; + const string d_mask; + const bool d_fold; }; union ComboAddress; -- 2.47.2