diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-11-10 09:20:25 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-11-17 10:05:15 -0800 |
commit | 5bdee52e5c441e6daaae7cf9f320257d0ea3d031 (patch) | |
tree | fc107897c960eeb76263d74145ffb14ccfc3e50d /src/mbgl/util/grid_index.cpp | |
parent | 3e074390b5afb0bf6d50b83c5327786bc011cd95 (diff) | |
download | qtlocation-mapboxgl-5bdee52e5c441e6daaae7cf9f320257d0ea3d031.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; - }; + } } } |