Fixed Clang warnings

master
Christophe Riccio ago%!(EXTRA string=11 years)
parent 72cbc4c065
commit 18b8e2fd4a
  1. 6
      glm/gtx/matrix_transform_2d.hpp
  2. 10
      glm/gtx/matrix_transform_2d.inl

@ -67,7 +67,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate( GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & angle); T angle);
/// Builds a scale 3 * 3 matrix created from a vector of 2 components. /// Builds a scale 3 * 3 matrix created from a vector of 2 components.
/// ///
@ -85,7 +85,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & y); T y);
/// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. /// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.
/// ///
@ -94,7 +94,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & x); T x);
/// @} /// @}
}//namespace glm }//namespace glm

@ -45,7 +45,7 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate( GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & angle) T angle)
{ {
T const a = angle; T const a = angle;
T const c = cos(a); T const c = cos(a);
@ -73,9 +73,9 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & y) T y)
{ {
tmat3x3<T, P> Result(); tmat3x3<T, P> Result(1);
Result[0][1] = y; Result[0][1] = y;
return m * Result; return m * Result;
} }
@ -83,9 +83,9 @@ namespace glm
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY( GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
tmat3x3<T, P> const & m, tmat3x3<T, P> const & m,
T const & x) T x)
{ {
tmat3x3<T, P> Result(); tmat3x3<T, P> Result(1);
Result[1][0] = x; Result[1][0] = x;
return m * Result; return m * Result;
} }

Loading…
Cancel
Save