diff options
author | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-05-20 12:11:54 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-05-21 12:56:48 +0300 |
commit | ef265805673726959c73785cee9669c62c29a2bb (patch) | |
tree | 8d858a77657b05929af929087e839b29f292be3a /3party | |
parent | 91dda74d7ec612c7ae78be491ee2f44c0dc2d73b (diff) |
Review fixes
Diffstat (limited to '3party')
-rw-r--r-- | 3party/kdtree++/kdtree.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/3party/kdtree++/kdtree.hpp b/3party/kdtree++/kdtree.hpp index 5f8fe02291..08ce1a902c 100644 --- a/3party/kdtree++/kdtree.hpp +++ b/3party/kdtree++/kdtree.hpp @@ -400,10 +400,10 @@ namespace KDTree _M_for_each(_M_get_root(), 0, toDo); } - template <class ToDo> bool any_of(ToDo toDo) const + template <class ToDo> bool for_any(ToDo toDo) const { if (_M_get_root()) - return _M_any_of(_M_get_root(), 0, toDo); + return _M_for_any(_M_get_root(), 0, toDo); return false; } @@ -666,16 +666,16 @@ namespace KDTree } template <class ToDo> - bool _M_any_of(_Link_const_type N, size_type const L, ToDo toDo) const + bool _M_for_any(_Link_const_type N, size_type const L, ToDo toDo) const { - if (toDo.Do(_S_value(N))) + if (toDo.DoIfIntersects(_S_value(N))) return true; if (_S_left(N) && toDo.ScanLeft(L, _S_value(N))) - return _M_any_of(_S_left(N), L+1, toDo); + return _M_for_any(_S_left(N), L+1, toDo); if (_S_right(N) && toDo.ScanRight(L, _S_value(N))) - return _M_any_of(_S_right(N), L+1, toDo); + return _M_for_any(_S_right(N), L+1, toDo); return false; } |