From: Otto Moerbeek Date: Wed, 27 Nov 2024 09:22:35 +0000 (+0100) Subject: Remove unregist and related code, it is not used X-Git-Tag: rec-5.2.0-rc1~25^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af3f152968a1ab823afe2ff2235ea53220a3301;p=thirdparty%2Fpdns.git Remove unregist and related code, it is not used --- diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index 556d6eb14f..0b21483cf6 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -234,7 +234,7 @@ public: static void regist(uint16_t cl, uint16_t ty, makerfunc_t* f, zmakerfunc_t* z, const char* name) { - assert(!d_locked); + assert(!d_locked); // NOLINT: it's the API if(f) getTypemap()[pair(cl,ty)]=f; if(z) @@ -244,14 +244,6 @@ public: getN2Typemap().emplace(name, pair(cl, ty)); } - static void unregist(uint16_t cl, uint16_t ty) - { - assert(!d_locked); - auto key = pair(cl, ty); - getTypemap().erase(key); - getZmakermap().erase(key); - } - static bool isUnknownType(const string& name) { return boost::starts_with(name, "TYPE") || boost::starts_with(name, "type"); diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index f674dd4da9..17d4083b31 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -37,7 +37,6 @@ #define includeboilerplate(RNAME) RNAME##RecordContent(const DNSRecord& dr, PacketReader& pr); \ RNAME##RecordContent(const string& zoneData); \ static void report(void); \ - static void unreport(void); \ static std::shared_ptr make(const DNSRecord &dr, PacketReader& pr); \ static std::shared_ptr make(const string& zonedata); \ string getZoneRepresentation(bool noDot=false) const override; \ @@ -1012,11 +1011,6 @@ void RNAME##RecordContent::report(void) { \ regist(1, QType::RNAME, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \ regist(254, QType::RNAME, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \ -} \ -void RNAME##RecordContent::unreport(void) \ -{ \ - unregist(1, QType::RNAME); \ - unregist(254, QType::RNAME); \ } \ \ RNAME##RecordContent::RNAME##RecordContent(const string& zoneData) \