mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Refactor code to use constexpr for data() functions.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
2d4c9b400c
commit
2a3465102a
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user