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

@@ -202,9 +202,9 @@ class SparseMatrix : public SparseCompressedBase<SparseMatrix<Scalar_, Options_,
inline StorageIndex* innerNonZeroPtr() { return m_innerNonZeros; }
/** \internal */
inline Storage& data() { return m_data; }
constexpr Storage& data() { return m_data; }
/** \internal */
inline const Storage& data() const { return m_data; }
constexpr const Storage& data() const { return m_data; }
/** \returns the value of the matrix at position \a i, \a j
* This function returns Scalar(0) if the element is an explicit \em zero */