mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Replace instances of EIGEN_CONSTEXPR macro
This commit is contained in:
@@ -69,10 +69,10 @@ class Homogeneous : public MatrixBase<Homogeneous<MatrixType, Direction_> >, int
|
||||
|
||||
EIGEN_DEVICE_FUNC explicit inline Homogeneous(const MatrixType& matrix) : m_matrix(matrix) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index rows() const EIGEN_NOEXCEPT {
|
||||
EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT {
|
||||
return m_matrix.rows() + (int(Direction) == Vertical ? 1 : 0);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index cols() const EIGEN_NOEXCEPT {
|
||||
EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT {
|
||||
return m_matrix.cols() + (int(Direction) == Horizontal ? 1 : 0);
|
||||
}
|
||||
|
||||
@@ -244,8 +244,8 @@ struct homogeneous_left_product_impl<Homogeneous<MatrixType, Vertical>, Lhs>
|
||||
EIGEN_DEVICE_FUNC homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs)
|
||||
: m_lhs(take_matrix_for_product<Lhs>::run(lhs)), m_rhs(rhs) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); }
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); }
|
||||
|
||||
template <typename Dest>
|
||||
EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const {
|
||||
@@ -275,8 +275,8 @@ struct homogeneous_right_product_impl<Homogeneous<MatrixType, Horizontal>, Rhs>
|
||||
typedef remove_all_t<typename Rhs::Nested> RhsNested;
|
||||
EIGEN_DEVICE_FUNC homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); }
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT { return m_lhs.rows(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_rhs.cols(); }
|
||||
|
||||
template <typename Dest>
|
||||
EIGEN_DEVICE_FUNC void evalTo(Dest& dst) const {
|
||||
|
||||
@@ -57,22 +57,22 @@ class QuaternionBase : public RotationBase<Derived, 3> {
|
||||
typedef AngleAxis<Scalar> AngleAxisType;
|
||||
|
||||
/** \returns the \c x coefficient */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType x() const { return this->derived().coeffs().coeff(0); }
|
||||
EIGEN_DEVICE_FUNC constexpr CoeffReturnType x() const { return this->derived().coeffs().coeff(0); }
|
||||
/** \returns the \c y coefficient */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType y() const { return this->derived().coeffs().coeff(1); }
|
||||
EIGEN_DEVICE_FUNC constexpr CoeffReturnType y() const { return this->derived().coeffs().coeff(1); }
|
||||
/** \returns the \c z coefficient */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType z() const { return this->derived().coeffs().coeff(2); }
|
||||
EIGEN_DEVICE_FUNC constexpr CoeffReturnType z() const { return this->derived().coeffs().coeff(2); }
|
||||
/** \returns the \c w coefficient */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline CoeffReturnType w() const { return this->derived().coeffs().coeff(3); }
|
||||
EIGEN_DEVICE_FUNC constexpr CoeffReturnType w() const { return this->derived().coeffs().coeff(3); }
|
||||
|
||||
/** \returns a reference to the \c x coefficient (if Derived is a non-const lvalue) */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType x() { return this->derived().coeffs().x(); }
|
||||
EIGEN_DEVICE_FUNC constexpr NonConstCoeffReturnType x() { return this->derived().coeffs().x(); }
|
||||
/** \returns a reference to the \c y coefficient (if Derived is a non-const lvalue) */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType y() { return this->derived().coeffs().y(); }
|
||||
EIGEN_DEVICE_FUNC constexpr NonConstCoeffReturnType y() { return this->derived().coeffs().y(); }
|
||||
/** \returns a reference to the \c z coefficient (if Derived is a non-const lvalue) */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType z() { return this->derived().coeffs().z(); }
|
||||
EIGEN_DEVICE_FUNC constexpr NonConstCoeffReturnType z() { return this->derived().coeffs().z(); }
|
||||
/** \returns a reference to the \c w coefficient (if Derived is a non-const lvalue) */
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline NonConstCoeffReturnType w() { return this->derived().coeffs().w(); }
|
||||
EIGEN_DEVICE_FUNC constexpr NonConstCoeffReturnType w() { return this->derived().coeffs().w(); }
|
||||
|
||||
/** \returns a read-only vector expression of the imaginary part (x,y,z) */
|
||||
EIGEN_DEVICE_FUNC inline const VectorBlock<const Coefficients, 3> vec() const { return coeffs().template head<3>(); }
|
||||
|
||||
@@ -353,10 +353,10 @@ class Transform {
|
||||
inline QTransform toQTransform(void) const;
|
||||
#endif
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT {
|
||||
EIGEN_DEVICE_FUNC constexpr Index rows() const EIGEN_NOEXCEPT {
|
||||
return int(Mode) == int(Projective) ? m_matrix.cols() : (m_matrix.cols() - 1);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
|
||||
|
||||
/** shortcut for m_matrix(row,col);
|
||||
* \sa MatrixBase::operator(Index,Index) const */
|
||||
|
||||
@@ -69,18 +69,18 @@ class Translation {
|
||||
EIGEN_DEVICE_FUNC explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
|
||||
|
||||
/** \brief Returns the x-translation by value. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar x() const { return m_coeffs.x(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar x() const { return m_coeffs.x(); }
|
||||
/** \brief Returns the y-translation by value. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar y() const { return m_coeffs.y(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar y() const { return m_coeffs.y(); }
|
||||
/** \brief Returns the z-translation by value. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar z() const { return m_coeffs.z(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar z() const { return m_coeffs.z(); }
|
||||
|
||||
/** \brief Returns the x-translation as a reference. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar& x() { return m_coeffs.x(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar& x() { return m_coeffs.x(); }
|
||||
/** \brief Returns the y-translation as a reference. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar& y() { return m_coeffs.y(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar& y() { return m_coeffs.y(); }
|
||||
/** \brief Returns the z-translation as a reference. **/
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR inline Scalar& z() { return m_coeffs.z(); }
|
||||
EIGEN_DEVICE_FUNC constexpr Scalar& z() { return m_coeffs.z(); }
|
||||
|
||||
EIGEN_DEVICE_FUNC const VectorType& vector() const { return m_coeffs; }
|
||||
EIGEN_DEVICE_FUNC VectorType& vector() { return m_coeffs; }
|
||||
|
||||
Reference in New Issue
Block a user