0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

Refactor exists method in AddrList to use std::find

Signed-off-by: Leonard Ossa <leonard.ossa@openvpn.com>
This commit is contained in:
Leonard Ossa 2024-07-09 14:31:35 +02:00
parent 3646265d15
commit f2856ec8ba

View File

@ -41,12 +41,7 @@ class AddrList : public std::vector<IP::Addr>, public RC<thread_unsafe_refcount>
bool exists(const IP::Addr &a) const
{
for (const_iterator i = begin(); i != end(); ++i)
{
if (a == *i)
return true;
}
return false;
return std::find(begin(), end(), a) != end();
}
#if 0