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

@@ -270,10 +270,10 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
}
/** \returns a const pointer to the data array of this matrix */
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar* data() const { return m_storage.data(); }
EIGEN_DEVICE_FUNC constexpr const Scalar* data() const { return m_storage.data(); }
/** \returns a pointer to the data array of this matrix */
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar* data() { return m_storage.data(); }
EIGEN_DEVICE_FUNC constexpr Scalar* data() { return m_storage.data(); }
/** Resizes \c *this to a \a rows x \a cols matrix.
*