Refactor code to use constexpr for data() functions.

This commit is contained in:
Frédéric BRIOL
2024-09-23 16:43:53 +00:00
committed by Rasmus Munk Larsen
parent 2d4c9b400c
commit 2a3465102a
14 changed files with 52 additions and 43 deletions

View File

@@ -588,9 +588,9 @@ class Transform {
EIGEN_DEVICE_FUNC inline Transform inverse(TransformTraits traits = (TransformTraits)Mode) const;
/** \returns a const pointer to the column major internal matrix */
EIGEN_DEVICE_FUNC const Scalar* data() const { return m_matrix.data(); }
EIGEN_DEVICE_FUNC constexpr const Scalar* data() const { return m_matrix.data(); }
/** \returns a non-const pointer to the column major internal matrix */
EIGEN_DEVICE_FUNC Scalar* data() { return m_matrix.data(); }
EIGEN_DEVICE_FUNC constexpr Scalar* data() { return m_matrix.data(); }
/** \returns \c *this with scalar type casted to \a NewScalarType
*