[wpimath] Replace constexpr coeff() and coeffRef() with operator() (#7391)

This commit is contained in:
Tyler Veness
2024-11-16 07:44:20 -08:00
committed by GitHub
parent ca51197486
commit aa7dd258c4
74 changed files with 1953 additions and 1329 deletions

View File

@@ -62,7 +62,7 @@ class ct_matrix {
* @param col Column index.
*/
constexpr const Scalar& operator()(int row, int col) const {
return m_storage.coeff(row, col);
return m_storage(row, col);
}
/**
@@ -71,9 +71,7 @@ class ct_matrix {
* @param row Row index.
* @param col Column index.
*/
constexpr Scalar& operator()(int row, int col) {
return m_storage.coeffRef(row, col);
}
constexpr Scalar& operator()(int row, int col) { return m_storage(row, col); }
/**
* Returns reference to matrix element.
@@ -83,7 +81,7 @@ class ct_matrix {
constexpr const Scalar& operator()(int index) const
requires(Rows == 1 || Cols == 1)
{
return m_storage.coeff(index);
return m_storage(index);
}
/**
@@ -94,7 +92,7 @@ class ct_matrix {
constexpr Scalar& operator()(int index)
requires(Rows == 1 || Cols == 1)
{
return m_storage.coeffRef(index);
return m_storage(index);
}
/**