Browse Source

Change arg to const & to avoid MSan issue. (#2415)

Jérémie Dumas 1 year ago
parent
commit
fac5d4a01d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/igl/AABB.cpp
  2. 1 1
      include/igl/AABB.h

+ 1 - 1
include/igl/AABB.cpp

@@ -787,7 +787,7 @@ template <typename DerivedV, int DIM>
 IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
 IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
   const RowVectorDIMS & /* p */,
   const RowVectorDIMS & /* p */,
   const Scalar sqr_d_candidate,
   const Scalar sqr_d_candidate,
-  const int i_candidate,
+  const int & i_candidate,
   const RowVectorDIMS & c_candidate,
   const RowVectorDIMS & c_candidate,
   Scalar & sqr_d,
   Scalar & sqr_d,
   int & i,
   int & i,

+ 1 - 1
include/igl/AABB.h

@@ -451,7 +451,7 @@ private:
       IGL_INLINE void set_min(
       IGL_INLINE void set_min(
         const RowVectorDIMS & p,
         const RowVectorDIMS & p,
         const Scalar sqr_d_candidate,
         const Scalar sqr_d_candidate,
-        const int i_candidate,
+        const int & i_candidate,
         const RowVectorDIMS & c_candidate,
         const RowVectorDIMS & c_candidate,
         Scalar & sqr_d,
         Scalar & sqr_d,
         int & i,
         int & i,