From: Amos Jeffries Date: Fri, 15 Dec 2017 02:50:53 +0000 (+1300) Subject: Convert Acl::InnerNode to C++11 for-each loop (#101) X-Git-Tag: M-staged-PR71~25 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7c260f41b61883acd9cda371f30d77d632d2ba6;p=thirdparty%2Fsquid.git Convert Acl::InnerNode to C++11 for-each loop (#101) This also fixes a bug in some STL implementations where passing for_each &ACL::prepareForUse results in the ACL class nil-method explicitly running instead of the child ACL class virtual method. --- diff --git a/src/acl/InnerNode.cc b/src/acl/InnerNode.cc index 33ca0cbf47..a5ec2e9444 100644 --- a/src/acl/InnerNode.cc +++ b/src/acl/InnerNode.cc @@ -21,7 +21,8 @@ void Acl::InnerNode::prepareForUse() { - std::for_each(nodes.begin(), nodes.end(), std::mem_fun(&ACL::prepareForUse)); + for (auto node : nodes) + node->prepareForUse(); } bool