break;
case SvcParam::ipv4hint:
xfr16BitInt(param.getIPHints().size() * 4); // size
- for (auto a: param.getIPHints()) {
+ for (const auto& a: param.getIPHints()) {
xfrCAWithoutPort(param.getKey(), a);
}
break;
}
int count = 0, pcount = 0, countNeg = 0;
- for (auto wipe : toWipe) {
+ for (const auto& wipe : toWipe) {
try {
auto res = wipeCaches(wipe.first, wipe.second, qtype);
count += res.record_count;
string ret("Configured Negative Trust Anchors:\n");
auto luaconf = g_luaconfs.getLocal();
- for (auto negAnchor : luaconf->negAnchors)
+ for (const auto& negAnchor : luaconf->negAnchors)
ret += negAnchor.first.toLogString() + "\t" + negAnchor.second + "\n";
return ret;
}
string ret("Configured Trust Anchors:\n");
auto luaconf = g_luaconfs.getLocal();
- for (auto anchor : luaconf->dsAnchors) {
+ for (const auto& anchor : luaconf->dsAnchors) {
ret += anchor.first.toLogString() + "\n";
- for (auto e : anchor.second) {
+ for (const auto& e : anchor.second) {
ret += "\t\t" + e.getZoneRepresentation() + "\n";
}
}
}
}
// Reset states for which the config generation changed and create new states for new configs
- for (auto config : configs) {
+ for (const auto& config : configs) {
auto state = states.find(config.first);
if (state != states.end()) {
if (state->second.d_generation != mygeneration) {
}
NetmaskGroup nmg;
- for (auto value : jlist.array_items()) {
+ for (const auto& value : jlist.array_items()) {
try {
nmg.addMask(value.string_value());
}
}
else if (kind == "FORWARDED") {
string serverlist;
- for (auto value : document["servers"].array_items()) {
+ for (const auto& value : document["servers"].array_items()) {
string server = value.string_value();
if (server == "") {
throw ApiException("Forwarded-to server must not be an empty string");