Skip to content

Commit

Permalink
Merge pull request #13208 from neheb/pai
Browse files Browse the repository at this point in the history
remove make_tuple and make_pair
  • Loading branch information
rgacogne authored Sep 7, 2023
2 parents 8dfbc47 + 5ee090c commit b02c8ad
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 54 deletions.
10 changes: 5 additions & 5 deletions modules/lmdbbackend/lmdbbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ std::pair<uint32_t, uint32_t> LMDBBackend::getSchemaVersionAndShards(std::string
if ((rc = mdb_env_open(env, filename.c_str(), MDB_NOSUBDIR | MDB_RDONLY, 0600)) != 0) {
if (rc == ENOENT) {
// we don't have a database yet! report schema 0, with 0 shards
return std::make_pair(0, 0);
return {0u, 0u};
}
mdb_env_close(env);
throw std::runtime_error("mdb_env_open failed");
Expand All @@ -109,7 +109,7 @@ std::pair<uint32_t, uint32_t> LMDBBackend::getSchemaVersionAndShards(std::string
// we pretend this means 5
mdb_txn_abort(txn);
mdb_env_close(env);
return std::make_pair(5, 0);
return {5u, 0u};
}
mdb_txn_abort(txn);
mdb_env_close(env);
Expand All @@ -127,7 +127,7 @@ std::pair<uint32_t, uint32_t> LMDBBackend::getSchemaVersionAndShards(std::string
// we pretend this means 5
mdb_txn_abort(txn);
mdb_env_close(env);
return std::make_pair(5, 0);
return {5u, 0u};
}

throw std::runtime_error("mdb_get pdns.schemaversion failed");
Expand Down Expand Up @@ -183,7 +183,7 @@ std::pair<uint32_t, uint32_t> LMDBBackend::getSchemaVersionAndShards(std::string
mdb_txn_abort(txn);
mdb_env_close(env);

return std::make_pair(schemaversion, shards);
return {schemaversion, shards};
}

namespace
Expand Down Expand Up @@ -1702,7 +1702,7 @@ void LMDBBackend::getAllDomainsFiltered(vector<DomainInfo>* domains, const std::
di.id = iter.getID();
di.backend = this;

if (!zonemap.insert(std::make_pair(di.zone, di)).second) {
if (!zonemap.emplace(di.zone, di).second) {
dups.insert(di.zone);
}
}
Expand Down
4 changes: 2 additions & 2 deletions pdns/bpf-filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ std::vector<std::tuple<DNSName, uint16_t, uint64_t> > BPFFilter::getQNameStats()
while (res == 0) {
if (bpf_lookup_elem(map.d_fd.getHandle(), &nextKey, &value) == 0) {
nextKey.qname[sizeof(nextKey.qname) - 1 ] = '\0';
result.push_back(std::make_tuple(DNSName(reinterpret_cast<const char*>(nextKey.qname), sizeof(nextKey.qname), 0, false), value.qtype, value.counter));
result.emplace_back(DNSName(reinterpret_cast<const char*>(nextKey.qname), sizeof(nextKey.qname), 0, false), value.qtype, value.counter);
}

res = bpf_get_next_key(map.d_fd.getHandle(), &nextKey, &nextKey);
Expand All @@ -853,7 +853,7 @@ std::vector<std::tuple<DNSName, uint16_t, uint64_t> > BPFFilter::getQNameStats()
while (res == 0) {
if (bpf_lookup_elem(map.d_fd.getHandle(), &nextKey, &value) == 0) {
nextKey.qname[sizeof(nextKey.qname) - 1 ] = '\0';
result.push_back(std::make_tuple(DNSName(reinterpret_cast<const char*>(nextKey.qname), sizeof(nextKey.qname), 0, false), key.qtype, value.counter));
result.emplace_back(DNSName(reinterpret_cast<const char*>(nextKey.qname), sizeof(nextKey.qname), 0, false), key.qtype, value.counter);
}

res = bpf_get_next_key(map.d_fd.getHandle(), &nextKey, &nextKey);
Expand Down
2 changes: 1 addition & 1 deletion pdns/channel.hh
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ namespace channel
setPipeBufferSize(receiver.getHandle(), pipeBufferSize);
}

return std::pair(Sender<T, D>(std::move(sender)), Receiver<T, D>(std::move(receiver), throwOnEOF));
return {Sender<T, D>(std::move(sender)), Receiver<T, D>(std::move(receiver), throwOnEOF)};
}
}
}
2 changes: 1 addition & 1 deletion pdns/dnsdist-dynbpf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ std::vector<std::tuple<ComboAddress, uint64_t, struct timespec> > DynBPFFilter::
for (const auto& stat : stats) {
const container_t::iterator it = data->d_entries.find(stat.first);
if (it != data->d_entries.end()) {
result.push_back(std::make_tuple(stat.first, stat.second, it->d_until));
result.emplace_back(stat.first, stat.second, it->d_until);
}
}
return result;
Expand Down
6 changes: 3 additions & 3 deletions pdns/dnsdist-lua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
LuaArray<std::shared_ptr<DownstreamState>> ret;
int count = 1;
for (const auto& s : g_dstates.getCopy()) {
ret.push_back(make_pair(count++, s));
ret.emplace_back(count++, s);
}
return ret;
});
Expand Down Expand Up @@ -1683,7 +1683,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
const auto localPools = g_pools.getCopy();
for (const auto& entry : localPools) {
const string& name = entry.first;
ret.push_back(make_pair(count++, name));
ret.emplace_back(count++, name);
}
return ret;
});
Expand Down Expand Up @@ -2380,7 +2380,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
LuaAssociativeTable<std::string> customResponseHeaders;
if (getOptionalValue<decltype(customResponseHeaders)>(vars, "customResponseHeaders", customResponseHeaders) > 0) {
for (auto const& headerMap : customResponseHeaders) {
std::pair<std::string, std::string> headerResponse = std::make_pair(boost::to_lower_copy(headerMap.first), headerMap.second);
auto headerResponse = std::pair(boost::to_lower_copy(headerMap.first), headerMap.second);
frontend->d_customResponseHeaders.insert(headerResponse);
}
}
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsdistdist/dnsdist-lbpolicies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template <class T> static std::shared_ptr<DownstreamState> getLeastOutstanding(c
size_t usableServers = 0;
for (const auto& d : servers) {
if (d.second->isUp()) {
poss[usableServers] = std::make_pair(std::make_tuple(d.second->outstanding.load(), d.second->d_config.order, d.second->getRelevantLatencyUsec()), d.first);
poss.at(usableServers) = std::pair(std::tuple(d.second->outstanding.load(), d.second->d_config.order, d.second->getRelevantLatencyUsec()), d.first);
usableServers++;
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ template <class T> static std::shared_ptr<DownstreamState> getValRandom(const Se
sum += d.second->d_config.d_weight;
}

poss[usableServers] = std::make_pair(sum, d.first);
poss.at(usableServers) = std::pair(sum, d.first);
usableServers++;
}
}
Expand Down
4 changes: 2 additions & 2 deletions pdns/gss_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#ifndef ENABLE_GSS_TSIG

std::tuple<size_t, size_t, size_t> GssContext::getCounts() { return std::make_tuple<size_t, size_t, size_t>(0, 0, 0); }
std::tuple<size_t, size_t, size_t> GssContext::getCounts() { return std::tuple<size_t, size_t, size_t>(0, 0, 0); }
bool GssContext::supported() { return false; }
GssContext::GssContext() :
d_error(GSS_CONTEXT_UNSUPPORTED), d_type(GSS_CONTEXT_NONE) {}
Expand Down Expand Up @@ -490,7 +490,7 @@ bool GssContext::getPeerPrincipal(std::string& name)

std::tuple<size_t, size_t, size_t> GssContext::getCounts()
{
return std::make_tuple(s_gss_init_creds.lock()->size(), s_gss_accept_creds.lock()->size(), s_gss_sec_context.lock()->size());
return {s_gss_init_creds.lock()->size(), s_gss_accept_creds.lock()->size(), s_gss_sec_context.lock()->size()};
}

void GssContext::processError(const std::string& method, OM_uint32 maj, OM_uint32 min)
Expand Down
2 changes: 1 addition & 1 deletion pdns/libssl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ std::pair<std::unique_ptr<SSL_CTX, decltype(&SSL_CTX_free)>, std::vector<std::st
}
#endif /* HAVE_SSL_CTX_SET_CIPHERSUITES */

return std::make_pair(std::move(ctx), std::move(warnings));
return {std::move(ctx), std::move(warnings)};
}

#ifdef HAVE_SSL_CTX_SET_KEYLOG_CALLBACK
Expand Down
2 changes: 1 addition & 1 deletion pdns/lua-auth4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void AuthLua4::postPrepareContext() {
d_lw->registerFunction<DNSPacket, Netmask()>("getRealRemote", [](DNSPacket &p) { return p.getRealRemote(); });
d_lw->registerFunction<DNSPacket, ComboAddress()>("getLocal", [](DNSPacket &p) { return p.getLocal(); });
d_lw->registerFunction<DNSPacket, unsigned int()>("getRemotePort", [](DNSPacket &p) { return p.getInnerRemote().getPort(); });
d_lw->registerFunction<DNSPacket, std::tuple<const std::string, unsigned int>()>("getQuestion", [](DNSPacket &p) { return std::make_tuple(p.qdomain.toString(), static_cast<unsigned int>(p.qtype.getCode())); });
d_lw->registerFunction<DNSPacket, std::tuple<const std::string, unsigned int>()>("getQuestion", [](DNSPacket &p) { return std::tuple(p.qdomain.toString(), static_cast<unsigned int>(p.qtype.getCode())); });
d_lw->registerFunction<DNSPacket, void(bool)>("setA", [](DNSPacket &p, bool a) { return p.setA(a); });
d_lw->registerFunction<DNSPacket, void(unsigned int)>("setID", [](DNSPacket &p, unsigned int id) { return p.setID(static_cast<uint16_t>(id)); });
d_lw->registerFunction<DNSPacket, void(bool)>("setRA", [](DNSPacket &p, bool ra) { return p.setRA(ra); });
Expand Down
4 changes: 2 additions & 2 deletions pdns/lua-record.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class IsUpOracle
for(const auto& m : rhs.opts)
rhsoopts[m.first]=m.second;

return std::make_tuple(rem, url, oopts) <
std::make_tuple(rhs.rem, rhs.url, rhsoopts);
return std::tuple(rem, url, oopts) <
std::tuple(rhs.rem, rhs.url, rhsoopts);
}
};
struct CheckState
Expand Down
4 changes: 2 additions & 2 deletions pdns/pdnsutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, con
}
svcbAliases.insert(rr.qname);
}
svcbTargets.emplace(std::make_tuple(rr.qname, svcbrc->getPriority(), svcbrc->getTarget(), svcbrc->autoHint(SvcParam::ipv4hint), svcbrc->autoHint(SvcParam::ipv6hint)));
svcbTargets.emplace(rr.qname, svcbrc->getPriority(), svcbrc->getTarget(), svcbrc->autoHint(SvcParam::ipv4hint), svcbrc->autoHint(SvcParam::ipv6hint));
svcbRecords.insert(rr.qname);
break;
case QType::HTTPS:
Expand All @@ -495,7 +495,7 @@ static int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, con
}
httpsAliases.insert(rr.qname);
}
httpsTargets.emplace(std::make_tuple(rr.qname, svcbrc->getPriority(), svcbrc->getTarget(), svcbrc->autoHint(SvcParam::ipv4hint), svcbrc->autoHint(SvcParam::ipv6hint)));
httpsTargets.emplace(rr.qname, svcbrc->getPriority(), svcbrc->getTarget(), svcbrc->autoHint(SvcParam::ipv4hint), svcbrc->autoHint(SvcParam::ipv6hint));
httpsRecords.insert(rr.qname);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion pdns/recursordist/rec-lua-conf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
exit(1); // FIXME proper exit code?
}

delayedThreads.rpzPrimaryThreads.push_back(std::make_tuple(primaries, defpol, defpolOverrideLocal, maxTTL, zoneIdx, tt, maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, sr, dumpFile));
delayedThreads.rpzPrimaryThreads.emplace_back(primaries, defpol, defpolOverrideLocal, maxTTL, zoneIdx, tt, maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, sr, dumpFile);
}

// A wrapper class that loads the standard Lua defintions into the context, so that we can use things like pdns.A
Expand Down
6 changes: 3 additions & 3 deletions pdns/recursordist/rec-zonetocache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ vState ZoneData::dnssecValidate(pdns::ZoneMD& zonemd, size_t& zonemdCount) const
if (nsecs.records.size() > 0 && nsecs.signatures.size() > 0) {
// Valdidate the NSEC
nsecValidationStatus = validateWithKeySet(d_now, d_zone, nsecs.records, nsecs.signatures, validKeys, std::nullopt);
csp.emplace(std::make_pair(d_zone, QType::NSEC), nsecs);
csp.emplace(std::pair(d_zone, QType::NSEC), nsecs);
}
else if (nsec3s.records.size() > 0 && nsec3s.signatures.size() > 0) {
// Validate NSEC3PARAMS
Expand All @@ -304,7 +304,7 @@ vState ZoneData::dnssecValidate(pdns::ZoneMD& zonemd, size_t& zonemdCount) const
}
// Valdidate the NSEC3
nsecValidationStatus = validateWithKeySet(d_now, zonemd.getNSEC3Label(), nsec3s.records, nsec3s.signatures, validKeys, std::nullopt);
csp.emplace(std::make_pair(zonemd.getNSEC3Label(), QType::NSEC3), nsec3s);
csp.emplace(std::pair(zonemd.getNSEC3Label(), QType::NSEC3), nsec3s);
}
else {
d_log->info("No NSEC(3) records and/or RRSIGS found to deny ZONEMD");
Expand Down Expand Up @@ -438,7 +438,7 @@ void RecZoneToCache::maintainStates(const map<DNSName, Config>& configs, map<DNS
}
}
else {
states.emplace(std::make_pair(config.first, State{0, 0, mygeneration}));
states.emplace(config.first, State{0, 0, mygeneration});
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions pdns/recursordist/rec_channel_rec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ static ProxyMappingStats_t* pleaseGetProxyMappingStats()
auto ret = new ProxyMappingStats_t;
if (t_proxyMapping) {
for (const auto& [key, entry] : *t_proxyMapping) {
ret->emplace(std::make_pair(key, ProxyMappingCounts{entry.stats.netmaskMatches, entry.stats.suffixMatches}));
ret->emplace(key, ProxyMappingCounts{entry.stats.netmaskMatches, entry.stats.suffixMatches});
}
}
return ret;
Expand All @@ -925,7 +925,7 @@ static RemoteLoggerStats_t* pleaseGetRemoteLoggerStats()

if (t_protobufServers.servers) {
for (const auto& server : *t_protobufServers.servers) {
ret->emplace(std::make_pair(server->address(), server->getStats()));
ret->emplace(server->address(), server->getStats());
}
}
return ret.release();
Expand All @@ -948,7 +948,7 @@ static RemoteLoggerStats_t* pleaseGetOutgoingRemoteLoggerStats()

if (t_outgoingProtobufServers.servers) {
for (const auto& server : *t_outgoingProtobufServers.servers) {
ret->emplace(std::make_pair(server->address(), server->getStats()));
ret->emplace(server->address(), server->getStats());
}
}
return ret.release();
Expand All @@ -961,7 +961,7 @@ static RemoteLoggerStats_t* pleaseGetFramestreamLoggerStats()

if (t_frameStreamServersInfo.servers) {
for (const auto& server : *t_frameStreamServersInfo.servers) {
ret->emplace(std::make_pair(server->address(), server->getStats()));
ret->emplace(server->address(), server->getStats());
}
}
return ret.release();
Expand All @@ -973,7 +973,7 @@ static RemoteLoggerStats_t* pleaseGetNODFramestreamLoggerStats()

if (t_nodFrameStreamServersInfo.servers) {
for (const auto& server : *t_nodFrameStreamServersInfo.servers) {
ret->emplace(std::make_pair(server->address(), server->getStats()));
ret->emplace(server->address(), server->getStats());
}
}
return ret.release();
Expand Down
8 changes: 4 additions & 4 deletions pdns/recursordist/recursor_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ MemRecursorCache::cache_t::const_iterator MemRecursorCache::getEntryUsingECSInde
/* we have nothing more specific for you */
break;
}
auto key = std::make_tuple(qname, qtype, boost::none, best);
auto key = std::tuple(qname, qtype, boost::none, best);
auto entry = map.d_map.find(key);
if (entry == map.d_map.end()) {
/* ecsIndex is not up-to-date */
Expand Down Expand Up @@ -274,7 +274,7 @@ MemRecursorCache::cache_t::const_iterator MemRecursorCache::getEntryUsingECSInde
}

/* we have nothing specific, let's see if we have a generic one */
auto key = std::make_tuple(qname, qtype, boost::none, Netmask());
auto key = std::tuple(qname, qtype, boost::none, Netmask());
auto entry = map.d_map.find(key);
if (entry != map.d_map.end()) {
handleServeStaleBookkeeping(now, serveStale, entry);
Expand Down Expand Up @@ -543,7 +543,7 @@ void MemRecursorCache::replace(time_t now, const DNSName& qname, const QType qt,

// We only store with a tag if we have an ednsmask and the tag is available
// We only store an ednsmask if we do not have a tag and we do have a mask.
auto key = std::make_tuple(qname, qt.getCode(), ednsmask ? routingTag : boost::none, (ednsmask && !routingTag) ? *ednsmask : Netmask());
auto key = std::tuple(qname, qt.getCode(), ednsmask ? routingTag : boost::none, (ednsmask && !routingTag) ? *ednsmask : Netmask());
bool isNew = false;
cache_t::iterator stored = lockedShard->d_map.find(key);
if (stored == lockedShard->d_map.end()) {
Expand All @@ -560,7 +560,7 @@ void MemRecursorCache::replace(time_t now, const DNSName& qname, const QType qt,
if (isNew || stored->d_ttd <= now) {
/* don't bother building an ecsIndex if we don't have any netmask-specific entries */
if (!routingTag && ednsmask && !ednsmask->empty()) {
auto ecsIndexKey = std::make_tuple(qname, qt.getCode());
auto ecsIndexKey = std::tuple(qname, qt.getCode());
auto ecsIndex = lockedShard->d_ecsIndex.find(ecsIndexKey);
if (ecsIndex == lockedShard->d_ecsIndex.end()) {
ecsIndex = lockedShard->d_ecsIndex.insert(ECSIndexEntry(qname, qt.getCode())).first;
Expand Down
14 changes: 7 additions & 7 deletions pdns/recursordist/syncres.cc
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ bool SyncRes::doSpecialNamesResolve(const DNSName& qname, const QType qtype, con
//! This is the 'out of band resolver', in other words, the authoritative server
void SyncRes::AuthDomain::addSOA(std::vector<DNSRecord>& records) const
{
SyncRes::AuthDomain::records_t::const_iterator ziter = d_records.find(std::make_tuple(getName(), QType::SOA));
SyncRes::AuthDomain::records_t::const_iterator ziter = d_records.find(std::tuple(getName(), QType::SOA));
if (ziter != d_records.end()) {
DNSRecord dr = *ziter;
dr.d_place = DNSResourceRecord::AUTHORITY;
Expand Down Expand Up @@ -958,7 +958,7 @@ int SyncRes::AuthDomain::getRecords(const DNSName& qname, const QType qtype, std

DNSName wcarddomain(qname);
while (wcarddomain != getName() && wcarddomain.chopOff()) {
range = d_records.equal_range(std::make_tuple(g_wildcarddnsname + wcarddomain));
range = d_records.equal_range(std::tuple(g_wildcarddnsname + wcarddomain));
if (range.first == range.second)
continue;

Expand All @@ -982,7 +982,7 @@ int SyncRes::AuthDomain::getRecords(const DNSName& qname, const QType qtype, std
/* Nothing for this name, no wildcard, let's see if there is some NS */
DNSName nsdomain(qname);
while (nsdomain.chopOff() && nsdomain != getName()) {
range = d_records.equal_range(std::make_tuple(nsdomain, QType::NS));
range = d_records.equal_range(std::tuple(nsdomain, QType::NS));
if (range.first == range.second)
continue;

Expand Down Expand Up @@ -1230,22 +1230,22 @@ void SyncRes::clearThrottle()

bool SyncRes::isThrottled(time_t now, const ComboAddress& server, const DNSName& target, QType qtype)
{
return s_throttle.lock()->shouldThrottle(now, std::make_tuple(server, target, qtype));
return s_throttle.lock()->shouldThrottle(now, std::tuple(server, target, qtype));
}

bool SyncRes::isThrottled(time_t now, const ComboAddress& server)
{
return s_throttle.lock()->shouldThrottle(now, std::make_tuple(server, g_rootdnsname, 0));
return s_throttle.lock()->shouldThrottle(now, std::tuple(server, g_rootdnsname, 0));
}

void SyncRes::doThrottle(time_t now, const ComboAddress& server, time_t duration, unsigned int tries)
{
s_throttle.lock()->throttle(now, std::make_tuple(server, g_rootdnsname, 0), duration, tries);
s_throttle.lock()->throttle(now, std::tuple(server, g_rootdnsname, 0), duration, tries);
}

void SyncRes::doThrottle(time_t now, const ComboAddress& server, const DNSName& name, QType qtype, time_t duration, unsigned int tries)
{
s_throttle.lock()->throttle(now, std::make_tuple(server, name, qtype), duration, tries);
s_throttle.lock()->throttle(now, std::tuple(server, name, qtype), duration, tries);
}

uint64_t SyncRes::doDumpThrottleMap(int fd)
Expand Down
2 changes: 1 addition & 1 deletion pdns/shuffle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static uint16_t mapTypesToOrder(uint16_t type)
void pdns::orderAndShuffle(vector<DNSRecord>& rrs, bool includingAdditionals)
{
std::stable_sort(rrs.begin(), rrs.end(), [](const DNSRecord& a, const DNSRecord& b) {
return std::make_tuple(a.d_place, mapTypesToOrder(a.d_type)) < std::make_tuple(b.d_place, mapTypesToOrder(b.d_type));
return std::tuple(a.d_place, mapTypesToOrder(a.d_type)) < std::tuple(b.d_place, mapTypesToOrder(b.d_type));
});
shuffle(rrs, includingAdditionals);
}
4 changes: 2 additions & 2 deletions pdns/signingpipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ namespace {
bool
dedupLessThan(const DNSZoneRecord& a, const DNSZoneRecord &b)
{
return std::make_tuple(a.dr.getContent()->getZoneRepresentation(), a.dr.d_ttl) < std::make_tuple(b.dr.getContent()->getZoneRepresentation(), b.dr.d_ttl); // XXX SLOW SLOW SLOW
return std::tuple(a.dr.getContent()->getZoneRepresentation(), a.dr.d_ttl) < std::tuple(b.dr.getContent()->getZoneRepresentation(), b.dr.d_ttl); // XXX SLOW SLOW SLOW
}

bool dedupEqual(const DNSZoneRecord& a, const DNSZoneRecord &b)
{
return std::make_tuple(a.dr.getContent()->getZoneRepresentation(), a.dr.d_ttl) == std::make_tuple(b.dr.getContent()->getZoneRepresentation(), b.dr.d_ttl); // XXX SLOW SLOW SLOW
return std::tuple(a.dr.getContent()->getZoneRepresentation(), a.dr.d_ttl) == std::tuple(b.dr.getContent()->getZoneRepresentation(), b.dr.d_ttl); // XXX SLOW SLOW SLOW
}
}

Expand Down
Loading

0 comments on commit b02c8ad

Please sign in to comment.