[core] Cleanup in response to review comments

This commit is contained in:
Chris Loer
2017-11-10 09:20:25 -08:00
committed by Chris Loer
parent 3e074390b5
commit 5bdee52e5c
6 changed files with 42 additions and 46 deletions

View File

@@ -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;
};
}
}
}