mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add const to non-mutating member functions across remaining modules
libeigen/eigen!2222 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ struct vector_int_pair {
|
||||
// iterator range or using bounding_box in a unified way
|
||||
template <typename ObjectList, typename VolumeList, typename BoxIter>
|
||||
struct get_boxes_helper {
|
||||
void operator()(const ObjectList &objects, BoxIter boxBegin, BoxIter boxEnd, VolumeList &outBoxes) {
|
||||
void operator()(const ObjectList &objects, BoxIter boxBegin, BoxIter boxEnd, VolumeList &outBoxes) const {
|
||||
outBoxes.insert(outBoxes.end(), boxBegin, boxEnd);
|
||||
eigen_assert(outBoxes.size() == objects.size());
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(objects);
|
||||
@@ -42,7 +42,7 @@ struct get_boxes_helper {
|
||||
|
||||
template <typename ObjectList, typename VolumeList>
|
||||
struct get_boxes_helper<ObjectList, VolumeList, int> {
|
||||
void operator()(const ObjectList &objects, int, int, VolumeList &outBoxes) {
|
||||
void operator()(const ObjectList &objects, int, int, VolumeList &outBoxes) const {
|
||||
outBoxes.reserve(objects.size());
|
||||
for (int i = 0; i < (int)objects.size(); ++i) outBoxes.push_back(bounding_box(objects[i]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user