From: bert hubert Date: Thu, 5 Nov 2015 08:20:39 +0000 (+0100) Subject: make DSRecordContent sort and compare X-Git-Tag: dnsdist-1.0.0-alpha1~187^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a820bc34263875153892c6eccca16f42104e130d;p=pdns make DSRecordContent sort and compare --- diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index 6ff7b535d..2e7cadf9a 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -302,6 +302,17 @@ class DSRecordContent : public DNSRecordContent { public: DSRecordContent(); + bool operator==(const DSRecordContent& rhs) const + { + return tie(d_tag, d_algorithm, d_digesttype, d_digest) == + tie(rhs.d_tag, rhs.d_algorithm, rhs.d_digesttype, rhs.d_digest); + } + bool operator<(const DSRecordContent& rhs) const + { + return tie(d_tag, d_algorithm, d_digesttype, d_digest) < + tie(rhs.d_tag, rhs.d_algorithm, rhs.d_digesttype, rhs.d_digest); + } + includeboilerplate(DS) uint16_t d_tag;