Skip to content

Commit

Permalink
#5740: Add missing inline qualifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 9, 2021
1 parent 7874754 commit 447e282
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libs/math/Matrix3.h
Expand Up @@ -16,8 +16,7 @@
*/
class alignas(16) Matrix3
{
// Underlying Eigen transform object (which can in turn be reduced to a 3x3
// Matrix)
// Underlying Eigen transform object (which can in turn be reduced to a 3x3 Matrix)
using Transform = Eigen::Projective2d;
Transform _transform;

Expand Down Expand Up @@ -201,7 +200,7 @@ class alignas(16) Matrix3
};

// Private constructor
Matrix3::Matrix3(double xx_, double xy_, double xz_,
inline Matrix3::Matrix3(double xx_, double xy_, double xz_,
double yx_, double yy_, double yz_,
double zx_, double zy_, double zz_)
{
Expand Down Expand Up @@ -237,7 +236,7 @@ inline Matrix3 Matrix3::byRows(double xx, double yx, double zx,
}

template<typename T>
BasicVector3<T> Matrix3::transform(const BasicVector3<T>& vector3) const
inline BasicVector3<T> Matrix3::transform(const BasicVector3<T>& vector3) const
{
Eigen::Matrix<T, 3, 1> eVec(static_cast<const double*>(vector3));
auto result = _transform * eVec;
Expand Down Expand Up @@ -268,7 +267,7 @@ inline Matrix3 operator*(const Matrix3& m1, const Matrix3& m2)
* Equivalent to m.transform(v).
*/
template<typename T>
BasicVector3<T> operator*(const Matrix3& m, const BasicVector3<T>& v)
inline BasicVector3<T> operator*(const Matrix3& m, const BasicVector3<T>& v)
{
return m.transform(v);
}
Expand All @@ -280,7 +279,7 @@ BasicVector3<T> operator*(const Matrix3& m, const BasicVector3<T>& v)
* equivalent to m.transformPoint(v).
*/
template<typename T>
BasicVector2<T> operator*(const Matrix3& m, const BasicVector2<T>& v)
inline BasicVector2<T> operator*(const Matrix3& m, const BasicVector2<T>& v)
{
return m.transformPoint(v);
}

0 comments on commit 447e282

Please sign in to comment.