Skip to content
Snippets Groups Projects
Commit e525f546 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/remove-shadow-warning' into 'master'

Fix shadowing warning in boundingboxtree.h



See merge request !50
parents 39ed5c21 b3d55c88
No related branches found
No related tags found
No related merge requests found
...@@ -322,10 +322,10 @@ public: ...@@ -322,10 +322,10 @@ public:
{ {
// Copy the iterator and get coordinates of first box // Copy the iterator and get coordinates of first box
auto it = begin; auto it = begin;
const double* b = leafBoxes.data() + 6*(*it); const double* bFirst = leafBoxes.data() + 6*(*it);
// Maybe write out the loop for optimization // Maybe write out the loop for optimization
for (std::size_t coordIdx = 0; coordIdx < 6; ++coordIdx) for (std::size_t coordIdx = 0; coordIdx < 6; ++coordIdx)
bBox[coordIdx] = b[coordIdx]; bBox[coordIdx] = bFirst[coordIdx];
// Compute min and max with the remaining boxes // Compute min and max with the remaining boxes
for (; it != end; ++it) for (; it != end; ++it)
...@@ -375,7 +375,7 @@ public: ...@@ -375,7 +375,7 @@ public:
struct lessXBox struct lessXBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessXBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessXBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 6*i; const double* bi = bBoxes.data() + 6*i;
...@@ -387,7 +387,7 @@ public: ...@@ -387,7 +387,7 @@ public:
struct lessYBox struct lessYBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessYBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessYBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 6*i; const double* bi = bBoxes.data() + 6*i;
...@@ -399,7 +399,7 @@ public: ...@@ -399,7 +399,7 @@ public:
struct lessZBox struct lessZBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessZBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessZBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 6*i; const double* bi = bBoxes.data() + 6*i;
...@@ -538,10 +538,10 @@ public: ...@@ -538,10 +538,10 @@ public:
{ {
// Copy the iterator and get coordinates of first box // Copy the iterator and get coordinates of first box
auto it = begin; auto it = begin;
const double* b = leafBoxes.data() + 4*(*it); const double* bFirst = leafBoxes.data() + 4*(*it);
// Maybe write out the loop for optimization // Maybe write out the loop for optimization
for (std::size_t coordIdx = 0; coordIdx < 4; ++coordIdx) for (std::size_t coordIdx = 0; coordIdx < 4; ++coordIdx)
bBox[coordIdx] = b[coordIdx]; bBox[coordIdx] = bFirst[coordIdx];
// Compute min and max with the remaining boxes // Compute min and max with the remaining boxes
for (; it != end; ++it) for (; it != end; ++it)
...@@ -581,7 +581,7 @@ public: ...@@ -581,7 +581,7 @@ public:
struct lessXBox struct lessXBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessXBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessXBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 4*i; const double* bi = bBoxes.data() + 4*i;
...@@ -593,7 +593,7 @@ public: ...@@ -593,7 +593,7 @@ public:
struct lessYBox struct lessYBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessYBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessYBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 4*i; const double* bi = bBoxes.data() + 4*i;
...@@ -663,9 +663,9 @@ public: ...@@ -663,9 +663,9 @@ public:
{ {
// Copy the iterator and get coordinates of first box // Copy the iterator and get coordinates of first box
auto it = begin; auto it = begin;
const double* b = leafBoxes.data() + 2*(*it); const double* bFirst = leafBoxes.data() + 2*(*it);
bBox[0] = b[0]; bBox[0] = bFirst[0];
bBox[1] = b[1]; bBox[1] = bFirst[1];
// Compute min and max with the remaining boxes // Compute min and max with the remaining boxes
for (; it != end; ++it) for (; it != end; ++it)
...@@ -692,7 +692,7 @@ public: ...@@ -692,7 +692,7 @@ public:
struct lessXBox struct lessXBox
{ {
const std::vector<double>& bBoxes; const std::vector<double>& bBoxes;
lessXBox(const std::vector<double>& bBoxes): bBoxes(bBoxes) {} lessXBox(const std::vector<double>& bBoxes_): bBoxes(bBoxes_) {}
inline bool operator()(unsigned int i, unsigned int j) inline bool operator()(unsigned int i, unsigned int j)
{ {
const double* bi = bBoxes.data() + 2*i; const double* bi = bBoxes.data() + 2*i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment