diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-11-10 09:20:25 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@gmail.com> | 2017-11-14 12:21:32 -0800 |
commit | 3aaa9818dfe29bcb030bc2a5ec8db9672966b4c7 (patch) | |
tree | 73d073976e924692d622a463d4a7e34e2be2cc44 /src/mbgl/util/grid_index.cpp | |
parent | f87eea8068cbac9635853b160e3a95b3b124f9b6 (diff) | |
download | qtlocation-mapboxgl-3aaa9818dfe29bcb030bc2a5ec8db9672966b4c7.tar.gz |
[core] Cleanup in response to review comments
Diffstat (limited to 'src/mbgl/util/grid_index.cpp')
-rw-r--r-- | src/mbgl/util/grid_index.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mbgl/util/grid_index.cpp b/src/mbgl/util/grid_index.cpp index 88ec1f2b86..1e1dcf0ed5 100644 --- a/src/mbgl/util/grid_index.cpp +++ b/src/mbgl/util/grid_index.cpp @@ -128,12 +128,12 @@ void GridIndex<T>::query(const BBox& queryBBox, std::function<bool (const T&, co for (auto& element : boxElements) { if (resultFn(element.first, element.second)) { return; - }; + } } for (auto& element : circleElements) { if (resultFn(element.first, convertToBox(element.second))) { return; - }; + } } return; } @@ -189,16 +189,15 @@ void GridIndex<T>::query(const BCircle& queryBCircle, std::function<bool (const if (noIntersection(queryBBox)) { return; } else if (completeIntersection(queryBBox)) { - // TODO: std::for_each? for (auto& element : boxElements) { if (resultFn(element.first, element.second)) { return; - }; + } } for (auto& element : circleElements) { if (resultFn(element.first, convertToBox(element.second))) { return; - }; + } } } |