From: bert hubert Date: Thu, 10 Sep 2015 11:24:47 +0000 (+0200) Subject: small BOOST_FOREACH cleanup, mostly to test my new development setup. X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1dc8f4d0aa691029e47b31803e9ccc9febb07a74;p=pdns small BOOST_FOREACH cleanup, mostly to test my new development setup. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 04cfea233..c981885dc 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -633,12 +633,12 @@ void startDoResolve(void *p) return; } if(tracedQuery || res == PolicyDecision::PASS || res == RCode::ServFail || pw.getHeader()->rcode == RCode::ServFail) - { + { string trace(sr.getTrace()); if(!trace.empty()) { vector lines; boost::split(lines, trace, boost::is_any_of("\n")); - BOOST_FOREACH(const string& line, lines) { + for(const string& line : lines) { if(!line.empty()) L< T broadcastAccFunction(const boost::function& func, bool { unsigned int n = 0; T ret=T(); - BOOST_FOREACH(ThreadPipeSet& tps, g_pipes) + for(ThreadPipeSet& tps : g_pipes) { if(n++ == t_id) { if(!skipSelf) { @@ -1867,7 +1867,7 @@ void parseACLs() std::vector extraConfigs; ::arg().gatherIncludes(extraConfigs); - BOOST_FOREACH(const std::string& fn, extraConfigs) { + for(const std::string& fn : extraConfigs) { if(!::arg().preParseFile(fn.c_str(), "allow-from-file", ::arg()["allow-from-file"])) throw runtime_error("Unable to re-parse configuration file include '"+fn+"'"); if(!::arg().preParseFile(fn.c_str(), "allow-from", ::arg()["allow-from"])) @@ -1992,7 +1992,7 @@ int serviceMain(int argc, char*argv[]) L<