From e9290586074c8edc24fd05b8d174154a4f2dc2d2 Mon Sep 17 00:00:00 2001 From: Leonard Ossa Date: Tue, 9 Jul 2024 16:12:51 +0200 Subject: [PATCH] Refactor by getting rid of redundant value in loop Signed-off-by: Leonard Ossa --- openvpn/addr/addrspacesplit.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openvpn/addr/addrspacesplit.hpp b/openvpn/addr/addrspacesplit.hpp index 737b0d5d..f1ce7f1d 100644 --- a/openvpn/addr/addrspacesplit.hpp +++ b/openvpn/addr/addrspacesplit.hpp @@ -94,9 +94,8 @@ class AddressSpaceSplitter : public RouteList static Type find(const RouteList &in, const Route &route) { Type type = Type::LEAF; - for(const auto& i : in) + for (const auto &r : in) { - const Route &r = i; if (route == r) type = Type::EQUAL; else if (route.contains(r))