]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove unregist and related code, it is not used
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 27 Nov 2024 09:22:35 +0000 (10:22 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 27 Nov 2024 09:22:35 +0000 (10:22 +0100)
pdns/dnsparser.hh
pdns/dnsrecords.hh

index 556d6eb14f58f2c44bd64e035c7fa4a0415a51e8..0b21483cf6e35c0e6e806629b81dd56483e0e54d 100644 (file)
@@ -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");
index f674dd4da9696fb6b206a7f4b6fc0e8e3995df79..17d4083b31d91630d99735da4e1165e4323e99ef 100644 (file)
@@ -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<DNSRecordContent> make(const DNSRecord &dr, PacketReader& pr);          \
   static std::shared_ptr<DNSRecordContent> 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)                                 \