diff --git a/glm/detail/_swizzle.hpp b/glm/detail/_swizzle.hpp index 8ee51d712d..2c9b5367b2 100644 --- a/glm/detail/_swizzle.hpp +++ b/glm/detail/_swizzle.hpp @@ -8,8 +8,8 @@ namespace detail struct _swizzle_base0 { protected: - GLM_FUNC_QUALIFIER T& elem(size_t i){ return (reinterpret_cast(_buffer))[i]; } - GLM_FUNC_QUALIFIER T const& elem(size_t i) const{ return (reinterpret_cast(_buffer))[i]; } + GLM_FUNC_QUALIFIER T& elem(int i){ return (reinterpret_cast(_buffer))[i]; } + GLM_FUNC_QUALIFIER T const& elem(int i) const{ return (reinterpret_cast(_buffer))[i]; } // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. // The size 1 buffer is assumed to aligned to the actual members so that the @@ -115,12 +115,12 @@ namespace detail GLM_FUNC_QUALIFIER T& operator[](size_t i) { - const std::size_t offset_dst[4] = { E0, E1, E2, E3 }; + const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } GLM_FUNC_QUALIFIER T operator[](size_t i) const { - const std::size_t offset_dst[4] = { E0, E1, E2, E3 }; + const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); }