Skip to content

Commit

Permalink
Remove unregist and related code, it is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Nov 27, 2024
1 parent f272ce8 commit 4af3f15
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
10 changes: 1 addition & 9 deletions pdns/dnsparser.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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");
Expand Down
6 changes: 0 additions & 6 deletions pdns/dnsrecords.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit 4af3f15

Please sign in to comment.