fix static inline versus inline static issues (the former is the correct order)

This commit is contained in:
Gael Guennebaud
2012-01-31 12:58:52 +01:00
parent 8d6e394b06
commit 9c86ee2695
34 changed files with 186 additions and 186 deletions

View File

@@ -144,7 +144,7 @@ public:
m_angle = Scalar(other.angle());
}
inline static const AngleAxis Identity() { return AngleAxis(0, Vector3::UnitX()); }
static inline const AngleAxis Identity() { return AngleAxis(0, Vector3::UnitX()); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -58,7 +58,7 @@ template< int Arch,typename VectorLhs,typename VectorRhs,
typename Scalar = typename VectorLhs::Scalar,
bool Vectorizable = (VectorLhs::Flags&VectorRhs::Flags)&PacketAccessBit>
struct cross3_impl {
inline static typename internal::plain_matrix_type<VectorLhs>::type
static inline typename internal::plain_matrix_type<VectorLhs>::type
run(const VectorLhs& lhs, const VectorRhs& rhs)
{
return typename internal::plain_matrix_type<VectorLhs>::type(
@@ -145,7 +145,7 @@ struct unitOrthogonal_selector
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef typename Derived::Index Index;
typedef Matrix<Scalar,2,1> Vector2;
inline static VectorType run(const Derived& src)
static inline VectorType run(const Derived& src)
{
VectorType perp = VectorType::Zero(src.size());
Index maxi = 0;
@@ -167,7 +167,7 @@ struct unitOrthogonal_selector<Derived,3>
typedef typename plain_matrix_type<Derived>::type VectorType;
typedef typename traits<Derived>::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
inline static VectorType run(const Derived& src)
static inline VectorType run(const Derived& src)
{
VectorType perp;
/* Let us compute the crossed product of *this with a vector
@@ -205,7 +205,7 @@ template<typename Derived>
struct unitOrthogonal_selector<Derived,2>
{
typedef typename plain_matrix_type<Derived>::type VectorType;
inline static VectorType run(const Derived& src)
static inline VectorType run(const Derived& src)
{ return VectorType(-conj(src.y()), conj(src.x())).normalized(); }
};

View File

@@ -115,7 +115,7 @@ public:
/** \returns a quaternion representing an identity rotation
* \sa MatrixBase::Identity()
*/
inline static Quaternion<Scalar> Identity() { return Quaternion<Scalar>(1, 0, 0, 0); }
static inline Quaternion<Scalar> Identity() { return Quaternion<Scalar>(1, 0, 0, 0); }
/** \sa QuaternionBase::Identity(), MatrixBase::setIdentity()
*/
@@ -293,7 +293,7 @@ protected:
Coefficients m_coeffs;
#ifndef EIGEN_PARSED_BY_DOXYGEN
EIGEN_STRONG_INLINE static void _check_template_params()
static EIGEN_STRONG_INLINE void _check_template_params()
{
EIGEN_STATIC_ASSERT( (_Options & DontAlign) == _Options,
INVALID_MATRIX_TEMPLATE_PARAMETERS)
@@ -440,7 +440,7 @@ typedef Map<Quaternion<double>, Aligned> QuaternionMapAlignedd;
namespace internal {
template<int Arch, class Derived1, class Derived2, typename Scalar, int _Options> struct quat_product
{
EIGEN_STRONG_INLINE static Quaternion<Scalar> run(const QuaternionBase<Derived1>& a, const QuaternionBase<Derived2>& b){
static EIGEN_STRONG_INLINE Quaternion<Scalar> run(const QuaternionBase<Derived1>& a, const QuaternionBase<Derived2>& b){
return Quaternion<Scalar>
(
a.w() * b.w() - a.x() * b.x() - a.y() * b.y() - a.z() * b.z(),
@@ -715,7 +715,7 @@ struct quaternionbase_assign_impl<Other,3,3>
{
typedef typename Other::Scalar Scalar;
typedef DenseIndex Index;
template<class Derived> inline static void run(QuaternionBase<Derived>& q, const Other& mat)
template<class Derived> static inline void run(QuaternionBase<Derived>& q, const Other& mat)
{
// This algorithm comes from "Quaternion Calculus and Fast Animation",
// Ken Shoemake, 1987 SIGGRAPH course notes
@@ -754,7 +754,7 @@ template<typename Other>
struct quaternionbase_assign_impl<Other,4,1>
{
typedef typename Other::Scalar Scalar;
template<class Derived> inline static void run(QuaternionBase<Derived>& q, const Other& vec)
template<class Derived> static inline void run(QuaternionBase<Derived>& q, const Other& vec)
{
q.coeffs() = vec;
}

View File

@@ -121,7 +121,7 @@ public:
m_angle = Scalar(other.angle());
}
inline static Rotation2D Identity() { return Rotation2D(0); }
static inline Rotation2D Identity() { return Rotation2D(0); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.

View File

@@ -115,7 +115,7 @@ struct rotation_base_generic_product_selector<RotationDerived,MatrixType,false>
{
enum { Dim = RotationDerived::Dim };
typedef Matrix<typename RotationDerived::Scalar,Dim,Dim> ReturnType;
inline static ReturnType run(const RotationDerived& r, const MatrixType& m)
static inline ReturnType run(const RotationDerived& r, const MatrixType& m)
{ return r.toRotationMatrix() * m; }
};
@@ -123,7 +123,7 @@ template<typename RotationDerived, typename Scalar, int Dim, int MaxDim>
struct rotation_base_generic_product_selector< RotationDerived, DiagonalMatrix<Scalar,Dim,MaxDim>, false >
{
typedef Transform<Scalar,Dim,Affine> ReturnType;
inline static ReturnType run(const RotationDerived& r, const DiagonalMatrix<Scalar,Dim,MaxDim>& m)
static inline ReturnType run(const RotationDerived& r, const DiagonalMatrix<Scalar,Dim,MaxDim>& m)
{
ReturnType res(r);
res.linear() *= m;
@@ -136,7 +136,7 @@ struct rotation_base_generic_product_selector<RotationDerived,OtherVectorType,tr
{
enum { Dim = RotationDerived::Dim };
typedef Matrix<typename RotationDerived::Scalar,Dim,1> ReturnType;
EIGEN_STRONG_INLINE static ReturnType run(const RotationDerived& r, const OtherVectorType& v)
static EIGEN_STRONG_INLINE ReturnType run(const RotationDerived& r, const OtherVectorType& v)
{
return r._transformVector(v);
}
@@ -192,20 +192,20 @@ namespace internal {
* \sa class Transform, class Rotation2D, class Quaternion, class AngleAxis
*/
template<typename Scalar, int Dim>
inline static Matrix<Scalar,2,2> toRotationMatrix(const Scalar& s)
static inline Matrix<Scalar,2,2> toRotationMatrix(const Scalar& s)
{
EIGEN_STATIC_ASSERT(Dim==2,YOU_MADE_A_PROGRAMMING_MISTAKE)
return Rotation2D<Scalar>(s).toRotationMatrix();
}
template<typename Scalar, int Dim, typename OtherDerived>
inline static Matrix<Scalar,Dim,Dim> toRotationMatrix(const RotationBase<OtherDerived,Dim>& r)
static inline Matrix<Scalar,Dim,Dim> toRotationMatrix(const RotationBase<OtherDerived,Dim>& r)
{
return r.toRotationMatrix();
}
template<typename Scalar, int Dim, typename OtherDerived>
inline static const MatrixBase<OtherDerived>& toRotationMatrix(const MatrixBase<OtherDerived>& mat)
static inline const MatrixBase<OtherDerived>& toRotationMatrix(const MatrixBase<OtherDerived>& mat)
{
EIGEN_STATIC_ASSERT(OtherDerived::RowsAtCompileTime==Dim && OtherDerived::ColsAtCompileTime==Dim,
YOU_MADE_A_PROGRAMMING_MISTAKE)

View File

@@ -614,7 +614,7 @@ public:
protected:
#ifndef EIGEN_PARSED_BY_DOXYGEN
EIGEN_STRONG_INLINE static void check_template_params()
static EIGEN_STRONG_INLINE void check_template_params()
{
EIGEN_STATIC_ASSERT((Options & (DontAlign|RowMajor)) == Options, INVALID_MATRIX_TEMPLATE_PARAMETERS)
}
@@ -1225,7 +1225,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 0 >
{
typedef typename MatrixType::PlainObject ResultType;
EIGEN_STRONG_INLINE static ResultType run(const TransformType& T, const MatrixType& other)
static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
{
return T.matrix() * other;
}
@@ -1243,7 +1243,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 1 >
typedef typename MatrixType::PlainObject ResultType;
EIGEN_STRONG_INLINE static ResultType run(const TransformType& T, const MatrixType& other)
static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
{
EIGEN_STATIC_ASSERT(OtherRows==HDim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
@@ -1269,7 +1269,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 2 >
typedef typename MatrixType::PlainObject ResultType;
EIGEN_STRONG_INLINE static ResultType run(const TransformType& T, const MatrixType& other)
static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
{
EIGEN_STATIC_ASSERT(OtherRows==Dim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);

View File

@@ -31,7 +31,7 @@ namespace internal {
template<class Derived, class OtherDerived>
struct quat_product<Architecture::SSE, Derived, OtherDerived, float, Aligned>
{
inline static Quaternion<float> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
static inline Quaternion<float> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
{
const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0,0,0,0x80000000));
Quaternion<float> res;
@@ -53,7 +53,7 @@ struct quat_product<Architecture::SSE, Derived, OtherDerived, float, Aligned>
template<typename VectorLhs,typename VectorRhs>
struct cross3_impl<Architecture::SSE,VectorLhs,VectorRhs,float,true>
{
inline static typename plain_matrix_type<VectorLhs>::type
static inline typename plain_matrix_type<VectorLhs>::type
run(const VectorLhs& lhs, const VectorRhs& rhs)
{
__m128 a = lhs.template packet<VectorLhs::Flags&AlignedBit ? Aligned : Unaligned>(0);
@@ -72,7 +72,7 @@ struct cross3_impl<Architecture::SSE,VectorLhs,VectorRhs,float,true>
template<class Derived, class OtherDerived>
struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
{
inline static Quaternion<double> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
static inline Quaternion<double> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
{
const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));