storvector_t stormap = this->convertToISCVector();
ostringstream ret;
ret<<"Private-key-format: v1.2\n";
- for(const stormap_t::value_type& value : stormap) {
+ for(const storvector_t::value_type& value : stormap) {
if(value.first != "Algorithm" && value.first != "PIN" &&
value.first != "Slot" && value.first != "Engine" &&
value.first != "Label" && value.first != "PubLabel")
}
const std::shared_ptr<Zone> getZone(const std::string& name) const
{
- for (const auto zone : d_zones) {
+ for (const auto& zone : d_zones) {
const auto& zName = zone->getName();
if (zName == name) {
return zone;
if (threadInfo.isListener) {
if (g_reusePort) {
/* then every listener has its own FDs */
- for(const auto deferred : threadInfo.deferredAdds) {
+ for(const auto& deferred : threadInfo.deferredAdds) {
t_fdm->addReadFD(deferred.first, deferred.second);
}
}
else {
/* otherwise all listeners are listening on the same ones */
- for(const auto deferred : g_deferredAdds) {
+ for(const auto& deferred : g_deferredAdds) {
t_fdm->addReadFD(deferred.first, deferred.second);
}
}
}
cerr<<" (";
bool first = true;
- for (auto const c : ::arg().getCommands()) {
+ for (const auto& c : ::arg().getCommands()) {
if (!first) {
cerr<<", ";
}
ce.d_records.clear();
ce.d_records.reserve(content.size());
- for(const auto i : content) {
+ for(const auto& i : content) {
/* Yes, we have altered the d_ttl value by adding time(nullptr) to it
prior to calling this function, so the TTL actually holds a TTD. */
ce.d_ttd=min(maxTTD, static_cast<time_t>(i.d_ttl)); // XXX this does weird things if TTLs differ in the set
const auto& sidx = map.d_map.get<SequencedTag>();
time_t now = time(0);
- for (const auto i : sidx) {
- for (const auto j : i.d_records) {
+ for (const auto& i : sidx) {
+ for (const auto& j : i.d_records) {
count++;
try {
fprintf(fp.get(), "%s %" PRId64 " IN %s %s ; (%s) auth=%i %s\n", i.d_qname.toString().c_str(), static_cast<int64_t>(i.d_ttd - now), DNSRecordContent::NumberToType(i.d_qtype).c_str(), j->getZoneRepresentation().c_str(), vStates[i.d_state], i.d_auth, i.d_netmask.empty() ? "" : i.d_netmask.toString().c_str());
}
}
- for(const auto i : oldAndNewDomains) {
+ for(const auto& i : oldAndNewDomains) {
broadcastAccFunction<uint64_t>(boost::bind(pleaseWipeCache, i, true, 0xffff));
broadcastAccFunction<uint64_t>(boost::bind(pleaseWipePacketCache, i, true, 0xffff));
broadcastAccFunction<uint64_t>(boost::bind(pleaseWipeAndCountNegCache, i, true));
uint64_t count=0;
const auto& throttleMap = t_sstorage.throttle.getThrottleMap();
- for(const auto i : throttleMap)
+ for(const auto& i : throttleMap)
{
count++;
char tmp[26];
qname.prependRawLabel(labelsToAdd.back());
labelsToAdd.pop_back();
auto records = dro.get(qname, (uint16_t)QType::NS);
- for (const auto record : records) {
+ for (const auto& record : records) {
if(record.d_type != QType::NS || record.d_name != qname)
continue;
foundCut = true;
DNSName getSigner(const std::vector<std::shared_ptr<RRSIGRecordContent> >& signatures)
{
- for (const auto sig : signatures) {
+ for (const auto& sig : signatures) {
if (sig) {
return sig->d_signer;
}