mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 07:44:10 +08:00
Cast Index to RealScalar
This fixes compilation issues with RealScalar types that are not implicitly castable from Index (e.g. ceres Jet types). Reported by Peter Anderson-Sprecher via eMail
This commit is contained in:
parent
3eb5ad0ed0
commit
ac21a08c13
@ -198,7 +198,7 @@ public:
|
|||||||
// this temporary is needed to workaround a MSVC issue
|
// this temporary is needed to workaround a MSVC issue
|
||||||
Index diagSize = (std::max<Index>)(1,m_diagSize);
|
Index diagSize = (std::max<Index>)(1,m_diagSize);
|
||||||
return m_usePrescribedThreshold ? m_prescribedThreshold
|
return m_usePrescribedThreshold ? m_prescribedThreshold
|
||||||
: diagSize*NumTraits<Scalar>::epsilon();
|
: RealScalar(diagSize)*NumTraits<Scalar>::epsilon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns true if \a U (full or thin) is asked for in this SVD decomposition */
|
/** \returns true if \a U (full or thin) is asked for in this SVD decomposition */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user