Slight optimization by avoiding an unnecessary initialization #654

This commit is contained in:
Christophe Riccio 2017-07-07 11:20:40 +04:30
parent 759a1d8ef2
commit 27f8e5b0a1

View File

@ -16,7 +16,7 @@ namespace glm
template <length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType> template <length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType>
GLM_FUNC_QUALIFIER matType<C, R, T, P> fliplr(matType<C, R, T, P> const& in) GLM_FUNC_QUALIFIER matType<C, R, T, P> fliplr(matType<C, R, T, P> const& in)
{ {
matType<C, R, T, P> out; matType<C, R, T, P> out(uninitialize);
for (length_t i = 0; i < C; i++) for (length_t i = 0; i < C; i++)
{ {
out[i] = in[(C - i) - 1]; out[i] = in[(C - i) - 1];