Skip to content

Commit

Permalink
Refactor iterating to range-based loop in find()
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Ossa <[email protected]>
  • Loading branch information
Leonard Ossa committed Jul 10, 2024
1 parent c524194 commit a8b6cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn/addr/addrspacesplit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ class AddressSpaceSplitter : public RouteList
static Type find(const RouteList &in, const Route &route)
{
Type type = Type::LEAF;
for (RouteList::const_iterator i = in.begin(); i != in.end(); ++i)
for(const auto& i : in)
{
const Route &r = *i;
const Route &r = i;
if (route == r)
type = Type::EQUAL;
else if (route.contains(r))
Expand Down

0 comments on commit a8b6cb0

Please sign in to comment.