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:
parent
3646265d15
commit
f2856ec8ba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user