From aa026cc0da2028a7041d1b8b3f27843f850f9fd8 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 25 Jul 2017 22:50:31 +0200 Subject: [PATCH] Removed glm::uninitialize --- glm/detail/func_common.inl | 2 +- glm/detail/func_common_simd.inl | 42 +++--- glm/detail/func_exponential_simd.inl | 12 +- glm/detail/func_geometric_simd.inl | 30 ++-- glm/detail/func_matrix.inl | 210 +++++++++++++------------- glm/detail/func_matrix_simd.inl | 32 ++-- glm/detail/func_vector_relational.inl | 14 +- glm/detail/setup.hpp | 8 - glm/detail/type_mat2x2.hpp | 1 - glm/detail/type_mat2x2.inl | 4 - glm/detail/type_mat2x3.hpp | 1 - glm/detail/type_mat2x3.inl | 6 +- glm/detail/type_mat2x4.hpp | 1 - glm/detail/type_mat2x4.inl | 6 +- glm/detail/type_mat3x2.hpp | 1 - glm/detail/type_mat3x2.inl | 6 +- glm/detail/type_mat3x3.hpp | 1 - glm/detail/type_mat3x3.inl | 6 +- glm/detail/type_mat3x4.hpp | 1 - glm/detail/type_mat3x4.inl | 6 +- glm/detail/type_mat4x2.hpp | 1 - glm/detail/type_mat4x2.inl | 6 +- glm/detail/type_mat4x3.hpp | 1 - glm/detail/type_mat4x3.inl | 6 +- glm/detail/type_mat4x4.hpp | 1 - glm/detail/type_mat4x4.inl | 6 +- glm/detail/type_vec1.hpp | 1 - glm/detail/type_vec1.inl | 4 - glm/detail/type_vec2.hpp | 1 - glm/detail/type_vec2.inl | 4 - glm/detail/type_vec3.hpp | 1 - glm/detail/type_vec3.inl | 4 - glm/detail/type_vec4.hpp | 1 - glm/detail/type_vec4.inl | 4 - glm/detail/type_vec4_simd.inl | 48 +++--- glm/gtc/integer.inl | 4 +- glm/gtc/matrix_inverse.inl | 4 +- glm/gtc/matrix_transform.inl | 6 +- glm/gtc/packing.inl | 46 +++--- glm/gtc/quaternion.hpp | 1 - glm/gtc/quaternion.inl | 20 +-- glm/gtc/quaternion_simd.inl | 20 +-- glm/gtc/ulp.inl | 10 +- glm/gtx/associated_min_max.inl | 32 ++-- glm/gtx/dual_quaternion.hpp | 1 - glm/gtx/dual_quaternion.inl | 8 +- glm/gtx/fast_exponential.inl | 2 +- glm/gtx/matrix_factorisation.inl | 2 +- glm/gtx/matrix_transform_2d.inl | 4 +- glm/gtx/quaternion.inl | 4 +- glm/gtx/rotate_normalized_axis.inl | 4 +- glm/simd/matrix.h | 2 +- readme.md | 1 + test/gtc/gtc_integer.cpp | 2 +- 54 files changed, 284 insertions(+), 368 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 67fda483..17bbdfa9 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -132,7 +132,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, vecType const & a) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = a[i] ? y[i] : x[i]; return Result; diff --git a/glm/detail/func_common_simd.inl b/glm/detail/func_common_simd.inl index 2b6ac5fa..daf6408e 100644 --- a/glm/detail/func_common_simd.inl +++ b/glm/detail/func_common_simd.inl @@ -15,7 +15,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_abs(v.data); return result; } @@ -26,7 +26,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v) { - vec<4, int, P> result(uninitialize); + vec<4, int, P> result; result.data = glm_ivec4_abs(v.data); return result; } @@ -37,7 +37,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_floor(v.data); return result; } @@ -48,7 +48,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_ceil(v.data); return result; } @@ -59,7 +59,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_fract(v.data); return result; } @@ -70,7 +70,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_round(v.data); return result; } @@ -81,7 +81,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = glm_vec4_mod(x.data, y.data); return result; } @@ -92,7 +92,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = _mm_min_ps(v1.data, v2.data); return result; } @@ -103,7 +103,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { - vec<4, int32, P> result(uninitialize); + vec<4, int32, P> result; result.data = _mm_min_epi32(v1.data, v2.data); return result; } @@ -114,7 +114,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) { - vec<4, uint32, P> result(uninitialize); + vec<4, uint32, P> result; result.data = _mm_min_epu32(v1.data, v2.data); return result; } @@ -125,7 +125,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = _mm_max_ps(v1.data, v2.data); return result; } @@ -136,7 +136,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { - vec<4, int32, P> result(uninitialize); + vec<4, int32, P> result; result.data = _mm_max_epi32(v1.data, v2.data); return result; } @@ -147,7 +147,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) { - vec<4, uint32, P> result(uninitialize); + vec<4, uint32, P> result; result.data = _mm_max_epu32(v1.data, v2.data); return result; } @@ -158,7 +158,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & minVal, vec<4, float, P> const & maxVal) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> result; result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data); return result; } @@ -169,7 +169,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & x, vec<4, int32, P> const & minVal, vec<4, int32, P> const & maxVal) { - vec<4, int32, P> result(uninitialize); + vec<4, int32, P> result; result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data); return result; } @@ -180,7 +180,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & x, vec<4, uint32, P> const & minVal, vec<4, uint32, P> const & maxVal) { - vec<4, uint32, P> result(uninitialize); + vec<4, uint32, P> result; result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data); return result; } @@ -194,7 +194,7 @@ namespace detail __m128i const Load = _mm_set_epi32(-static_cast(a.w), -static_cast(a.z), -static_cast(a.y), -static_cast(a.x)); __m128 const Mask = _mm_castsi128_ps(Load); - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; # if 0 && GLM_ARCH & GLM_ARCH_AVX Result.data = _mm_blendv_ps(x.data, y.data, Mask); # else @@ -209,7 +209,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x) { - vec<4, float, P> result(uninitialize); + vec<4, float, P> Result; result.data = glm_vec4_step(edge.data, x.data); return result; } @@ -220,9 +220,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge0, vec<4, float, P> const& edge1, vec<4, float, P> const& x) { - vec<4, float, P> result(uninitialize); - result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data); - return result; + vec<4, float, P> Result; + Result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data); + return Result; } }; }//namespace detail diff --git a/glm/detail/func_exponential_simd.inl b/glm/detail/func_exponential_simd.inl index 9ac60ba9..b3bdf85a 100644 --- a/glm/detail/func_exponential_simd.inl +++ b/glm/detail/func_exponential_simd.inl @@ -13,9 +13,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); - result.data = _mm_sqrt_ps(v.data); - return result; + vec<4, float, P> Result; + Result.data = _mm_sqrt_ps(v.data); + return Result; } }; @@ -24,9 +24,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v) { - vec<4, float, aligned_lowp> result(uninitialize); - result.data = glm_vec4_sqrt_lowp(v.data); - return result; + vec<4, float, aligned_lowp> Result; + Result.data = glm_vec4_sqrt_lowp(v.data); + return Result; } }; }//namespace detail diff --git a/glm/detail/func_geometric_simd.inl b/glm/detail/func_geometric_simd.inl index 7ddf9e05..3819c6a2 100644 --- a/glm/detail/func_geometric_simd.inl +++ b/glm/detail/func_geometric_simd.inl @@ -44,9 +44,9 @@ namespace detail __m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x); __m128 const xpd0 = glm_vec4_cross(set0, set1); - vec<4, float, P> result(uninitialize); - result.data = xpd0; - return vec<3, float, P>(result); + vec<4, float, P> Result; + Result.data = xpd0; + return vec<3, float, P>(Result); } }; @@ -55,9 +55,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - vec<4, float, P> result(uninitialize); - result.data = glm_vec4_normalize(v.data); - return result; + vec<4, float, P> Result; + Result.data = glm_vec4_normalize(v.data); + return Result; } }; @@ -66,9 +66,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& N, vec<4, float, P> const& I, vec<4, float, P> const& Nref) { - vec<4, float, P> result(uninitialize); - result.data = glm_vec4_faceforward(N.data, I.data, Nref.data); - return result; + vec<4, float, P> Result; + Result.data = glm_vec4_faceforward(N.data, I.data, Nref.data); + return Result; } }; @@ -77,9 +77,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N) { - vec<4, float, P> result(uninitialize); - result.data = glm_vec4_reflect(I.data, N.data); - return result; + vec<4, float, P> Result; + Result.data = glm_vec4_reflect(I.data, N.data); + return Result; } }; @@ -88,9 +88,9 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta) { - vec<4, float, P> result(uninitialize); - result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta)); - return result; + vec<4, float, P> Result; + Result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta)); + return Result; } }; }//namespace detail diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index cdfe8258..8f068bc2 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -12,10 +12,10 @@ namespace detail { GLM_FUNC_QUALIFIER static matType call(matType const& x, matType const& y) { - matType result(uninitialize); - for(length_t i = 0; i < result.length(); ++i) - result[i] = x[i] * y[i]; - return result; + matType Result; + for(length_t i = 0; i < Result.length(); ++i) + Result[i] = x[i] * y[i]; + return Result; } }; @@ -27,12 +27,12 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m) { - mat<2, 2, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - return result; + mat<2, 2, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + return Result; } }; @@ -41,14 +41,14 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<3, 2, T, P> call(mat<2, 3, T, P> const& m) { - mat<3,2, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - return result; + mat<3,2, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + return Result; } }; @@ -57,16 +57,16 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<4, 2, T, P> call(mat<2, 4, T, P> const& m) { - mat<4, 2, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - return result; + mat<4, 2, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[3][0] = m[0][3]; + Result[3][1] = m[1][3]; + return Result; } }; @@ -75,14 +75,14 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<2, 3, T, P> call(mat<3, 2, T, P> const& m) { - mat<2, 3, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - return result; + mat<2, 3, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + return Result; } }; @@ -91,19 +91,19 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m) { - mat<3, 3, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; + mat<3, 3, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - return result; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + return Result; } }; @@ -112,20 +112,20 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<4, 3, T, P> call(mat<3, 4, T, P> const& m) { - mat<4, 3, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - return result; + mat<4, 3, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + Result[3][0] = m[0][3]; + Result[3][1] = m[1][3]; + Result[3][2] = m[2][3]; + return Result; } }; @@ -134,16 +134,16 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<2, 4, T, P> call(mat<4, 2, T, P> const& m) { - mat<2, 4, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - return result; + mat<2, 4, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[0][3] = m[3][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[1][3] = m[3][1]; + return Result; } }; @@ -152,20 +152,20 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<3, 4, T, P> call(mat<4, 3, T, P> const& m) { - mat<3, 4, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; - return result; + mat<3, 4, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[0][3] = m[3][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[1][3] = m[3][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + Result[2][3] = m[3][2]; + return Result; } }; @@ -174,27 +174,27 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m) { - mat<4, 4, T, P> result(uninitialize); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; + mat<4, 4, T, P> Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[1][3] = m[3][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + Result[2][3] = m[3][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - result[3][3] = m[3][3]; - return result; + Result[3][0] = m[0][3]; + Result[3][1] = m[1][3]; + Result[3][2] = m[2][3]; + Result[3][3] = m[3][3]; + return Result; } }; @@ -278,7 +278,7 @@ namespace detail - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2])); - mat<3, 3, T, P> Inverse(uninitialize); + mat<3, 3, T, P> Inverse; Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant; Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant; Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant; @@ -367,7 +367,7 @@ namespace detail { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs"); - typename detail::outerProduct_trait::type m(uninitialize); + typename detail::outerProduct_trait::type m; for(length_t i = 0; i < m.length(); ++i) m[i] = c * r[i]; return m; diff --git a/glm/detail/func_matrix_simd.inl b/glm/detail/func_matrix_simd.inl index bf5e5ee8..beadc87f 100644 --- a/glm/detail/func_matrix_simd.inl +++ b/glm/detail/func_matrix_simd.inl @@ -17,12 +17,12 @@ namespace detail GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & x, mat<4, 4, float, P> const & y) { - mat<4, 4, float, P> result(uninitialize); + mat<4, 4, float, P> Result; glm_mat4_matrixCompMult( *static_cast(&x[0].data), *static_cast(&y[0].data), - *static_cast(&result[0].data)); - return result; + *static_cast(&Result[0].data)); + return Result; } }; @@ -31,11 +31,11 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & m) { - mat<4, 4, float, P> result(uninitialize); + mat<4, 4, float, P> Result; glm_mat4_transpose( *static_cast(&m[0].data), - *static_cast(&result[0].data)); - return result; + *static_cast(&Result[0].data)); + return Result; } }; @@ -53,7 +53,7 @@ namespace detail { GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& m) { - mat<4, 4, float, P> Result(uninitialize); + mat<4, 4, float, P> Result; glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); return Result; } @@ -63,25 +63,25 @@ namespace detail template<> GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_lowp> outerProduct<4, 4, float, aligned_lowp, vec, vec>(vec<4, float, aligned_lowp> const & c, vec<4, float, aligned_lowp> const & r) { - mat<4, 4, float, aligned_lowp> m(uninitialize); - glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); - return m; + mat<4, 4, float, aligned_lowp> Result; + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); + return Result; } template<> GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_mediump> outerProduct<4, 4, float, aligned_mediump, vec, vec>(vec<4, float, aligned_mediump> const & c, vec<4, float, aligned_mediump> const & r) { - mat<4, 4, float, aligned_mediump> m(uninitialize); - glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); - return m; + mat<4, 4, float, aligned_mediump> Result; + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); + return Result; } template<> GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_highp> outerProduct<4, 4, float, aligned_highp, vec, vec>(vec<4, float, aligned_highp> const & c, vec<4, float, aligned_highp> const & r) { - mat<4, 4, float, aligned_highp> m(uninitialize); - glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); - return m; + mat<4, 4, float, aligned_highp> Result; + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); + return Result; } }//namespace glm diff --git a/glm/detail/func_vector_relational.inl b/glm/detail/func_vector_relational.inl index 88ab56da..0dbf2af8 100644 --- a/glm/detail/func_vector_relational.inl +++ b/glm/detail/func_vector_relational.inl @@ -10,7 +10,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] < y[i]; @@ -22,7 +22,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] <= y[i]; return Result; @@ -33,7 +33,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] > y[i]; return Result; @@ -44,7 +44,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] >= y[i]; return Result; @@ -55,7 +55,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] == y[i]; return Result; @@ -66,7 +66,7 @@ namespace glm { assert(x.length() == y.length()); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] != y[i]; return Result; @@ -93,7 +93,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType not_(vecType const & v) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0; i < v.length(); ++i) Result[i] = !v[i]; return Result; diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 2e0b2d0d..87e05e8a 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -775,14 +775,6 @@ namespace glm # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0]) #endif -/////////////////////////////////////////////////////////////////////////////////// -// Uninitialize constructors - -namespace glm -{ - enum ctor{uninitialize}; -}//namespace glm - /////////////////////////////////////////////////////////////////////////////////// // Check inclusions of different versions of GLM diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index 2ad233d6..16d28314 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -39,7 +39,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<2, 2, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T const & x1, T const & y1, diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index fb909e5e..9cda74a2 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -30,10 +30,6 @@ namespace glm this->value[1] = m.value[1]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 2, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(T scalar) { diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 30ae1ac4..c4847b25 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<2, 3, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, T z0, diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index fb2d1d04..c69fc78f 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -28,10 +28,6 @@ namespace glm this->value[1] = m.value[1]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 3, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(T scalar) { @@ -390,7 +386,7 @@ namespace glm T SrcB20 = m2[2][0]; T SrcB21 = m2[2][1]; - mat<3, 3, T, P> Result(uninitialize); + mat<3, 3, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index 20c1a65b..bd4cf779 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<2, 4, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, T z0, T w0, diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index c7526ce0..61c9fb28 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -28,10 +28,6 @@ namespace glm this->value[1] = m.value[1]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 4, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(T scalar) { @@ -378,7 +374,7 @@ namespace glm T SrcB30 = m2[3][0]; T SrcB31 = m2[3][1]; - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 0258d06d..8331003b 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<3, 2, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 0f5ea0ac..95a733fa 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -30,10 +30,6 @@ namespace glm this->value[2] = m.value[2]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 2, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(T scalar) { @@ -418,7 +414,7 @@ namespace glm const T SrcB11 = m2[1][1]; const T SrcB12 = m2[1][2]; - mat<2, 2, T, P> Result(uninitialize); + mat<2, 2, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 4e1d7e9f..fd1e3afb 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -39,7 +39,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<3, 3, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, T z0, diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 8fee082b..2b5b5815 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -32,10 +32,6 @@ namespace glm this->value[2] = m.value[2]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 3, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(T scalar) { @@ -459,7 +455,7 @@ namespace glm T const SrcB21 = m2[2][1]; T const SrcB22 = m2[2][2]; - mat<3, 3, T, P> Result(uninitialize); + mat<3, 3, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 6775ab2e..0cb50202 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<3, 4, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, T z0, T w0, diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index f931cc60..bd9008f9 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -30,10 +30,6 @@ namespace glm this->value[2] = m.value[2]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 4, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(T scalar) { @@ -440,7 +436,7 @@ namespace glm const T SrcB31 = m2[3][1]; const T SrcB32 = m2[3][2]; - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index 9f875183..3390b2f7 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL mat( T x0, T y0, diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 7b8986d8..1998b97e 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -32,10 +32,6 @@ namespace glm this->value[3] = m.value[3]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 2, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(T scalar) { @@ -461,7 +457,7 @@ namespace glm T const SrcB12 = m2[1][2]; T const SrcB13 = m2[1][3]; - mat<2, 2, T, P> Result(uninitialize); + mat<2, 2, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index e3926e3e..47cc1333 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -40,7 +40,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<4, 3, T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor); GLM_FUNC_DECL explicit mat(T const & x); GLM_FUNC_DECL mat( T const & x0, T const & y0, T const & z0, diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index a304a033..0492c32c 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -32,10 +32,6 @@ namespace glm this->value[3] = m.value[3]; } - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 3, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(T const & s) { @@ -488,7 +484,7 @@ namespace glm T const SrcB22 = m2[2][2]; T const SrcB23 = m2[2][3]; - mat<3, 3, T, P> Result(uninitialize); + mat<3, 3, T, P> Result; Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03; diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 4b1d9d41..9c7133b4 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -39,7 +39,6 @@ namespace glm template GLM_FUNC_DECL mat(mat<4, 4, T, Q> const& m); - GLM_FUNC_DECL explicit mat(ctor); GLM_FUNC_DECL explicit mat(T const & x); GLM_FUNC_DECL mat( T const & x0, T const & y0, T const & z0, T const & w0, diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index bce3cc71..2e05f9f7 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -34,10 +34,6 @@ namespace glm this->value[3] = m[3]; } - template - GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(ctor) - {} - template GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(T const & s) { @@ -597,7 +593,7 @@ namespace glm typename mat<4, 4, T, P>::col_type const SrcB2 = m2[2]; typename mat<4, 4, T, P>::col_type const SrcB3 = m2[3]; - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3]; Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3]; Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3]; diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index db047f51..1500631b 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -92,7 +92,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); // -- Conversion vector constructors -- diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 283f3593..10ef44f4 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -26,10 +26,6 @@ namespace glm // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(T scalar) : x(scalar) diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index c6ae942f..3d7e8893 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -93,7 +93,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T x, T y); diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index 4fdb8e04..24afe5c2 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -26,10 +26,6 @@ namespace glm // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T scalar) : x(scalar), y(scalar) diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 81db2bf5..a0ad92c0 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -93,7 +93,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T a, T b, T c); diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index a02e14e1..830fe91d 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -26,10 +26,6 @@ namespace glm // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T scalar) : x(scalar), y(scalar), z(scalar) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 95fb2fb1..b512365a 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -96,7 +96,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(T x, T y, T z, T w); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 214236b4..8ff34cfe 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -175,10 +175,6 @@ namespace detail // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T scalar) : x(scalar), y(scalar), z(scalar), w(scalar) diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index 27117443..8b045a52 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -14,7 +14,7 @@ namespace detail { __m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer); - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; # if GLM_ARCH & GLM_ARCH_AVX_BIT Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0)); # else @@ -31,7 +31,7 @@ namespace detail { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - vec<4, int32, P> Result(uninitialize); + vec<4, int32, P> Result; Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } @@ -44,7 +44,7 @@ namespace detail { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - vec<4, uint32, P> Result(uninitialize); + vec<4, uint32, P> Result; Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } @@ -56,7 +56,7 @@ namespace detail { static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_add_ps(a.data, b.data); return Result; } @@ -68,7 +68,7 @@ namespace detail { static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - vec<4, double, P> Result(uninitialize); + vec<4, double, P> Result; Result.data = _mm256_add_pd(a.data, b.data); return Result; } @@ -80,7 +80,7 @@ namespace detail { static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_sub_ps(a.data, b.data); return Result; } @@ -92,7 +92,7 @@ namespace detail { static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - vec<4, double, P> Result(uninitialize); + vec<4, double, P> Result; Result.data = _mm256_sub_pd(a.data, b.data); return Result; } @@ -104,7 +104,7 @@ namespace detail { static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_mul_ps(a.data, b.data); return Result; } @@ -116,7 +116,7 @@ namespace detail { static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - vec<4, double, P> Result(uninitialize); + vec<4, double, P> Result; Result.data = _mm256_mul_pd(a.data, b.data); return Result; } @@ -128,7 +128,7 @@ namespace detail { static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_div_ps(a.data, b.data); return Result; } @@ -140,7 +140,7 @@ namespace detail { static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - vec<4, double, P> Result(uninitialize); + vec<4, double, P> Result; Result.data = _mm256_div_pd(a.data, b.data); return Result; } @@ -152,7 +152,7 @@ namespace detail { static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & a, vec<4, float, aligned_lowp> const & b) { - vec<4, float, aligned_lowp> Result(uninitialize); + vec<4, float, aligned_lowp> Result; Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data)); return Result; } @@ -163,7 +163,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_and_si128(a.data, b.data); return Result; } @@ -175,7 +175,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_and_si256(a.data, b.data); return Result; } @@ -187,7 +187,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_or_si128(a.data, b.data); return Result; } @@ -199,7 +199,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_or_si256(a.data, b.data); return Result; } @@ -211,7 +211,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_xor_si128(a.data, b.data); return Result; } @@ -223,7 +223,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_xor_si256(a.data, b.data); return Result; } @@ -235,7 +235,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_sll_epi32(a.data, b.data); return Result; } @@ -247,7 +247,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_sll_epi64(a.data, b.data); return Result; } @@ -259,7 +259,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_srl_epi32(a.data, b.data); return Result; } @@ -271,7 +271,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_srl_epi64(a.data, b.data); return Result; } @@ -283,7 +283,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const & v) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1)); return Result; } @@ -295,7 +295,7 @@ namespace detail { static vec<4, T, P> call(vec<4, T, P> const & v) { - vec<4, T, P> Result(uninitialize); + vec<4, T, P> Result; Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1)); return Result; } diff --git a/glm/gtc/integer.inl b/glm/gtc/integer.inl index 1dfe9038..0bedc467 100644 --- a/glm/gtc/integer.inl +++ b/glm/gtc/integer.inl @@ -21,13 +21,11 @@ namespace detail { GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v) { - vec<4, int, P> Result(glm::uninitialize); - + vec<4, int, P> Result; _BitScanReverse(reinterpret_cast(&Result.x), v.x); _BitScanReverse(reinterpret_cast(&Result.y), v.y); _BitScanReverse(reinterpret_cast(&Result.z), v.z); _BitScanReverse(reinterpret_cast(&Result.w), v.w); - return Result; } }; diff --git a/glm/gtc/matrix_inverse.inl b/glm/gtc/matrix_inverse.inl index b1d9d900..0d1f9f26 100644 --- a/glm/gtc/matrix_inverse.inl +++ b/glm/gtc/matrix_inverse.inl @@ -48,7 +48,7 @@ namespace glm - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]); - mat<3, 3, T, P> Inverse(uninitialize); + mat<3, 3, T, P> Inverse; Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); @@ -86,7 +86,7 @@ namespace glm T SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; T SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; - mat<4, 4, T, P> Inverse(uninitialize); + mat<4, 4, T, P> Inverse; Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02); Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04); Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05); diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index bf8aed6c..2bb78d19 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -25,7 +25,7 @@ namespace glm vec<3, T, P> axis(normalize(v)); vec<3, T, P> temp((T(1) - c) * axis); - mat<4, 4, T, P> Rotate(uninitialize); + mat<4, 4, T, P> Rotate; Rotate[0][0] = c + temp[0] * axis[0]; Rotate[0][1] = temp[0] * axis[1] + s * axis[2]; Rotate[0][2] = temp[0] * axis[2] - s * axis[1]; @@ -38,7 +38,7 @@ namespace glm Rotate[2][1] = temp[2] * axis[1] - s * axis[0]; Rotate[2][2] = c + temp[2] * axis[2]; - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; @@ -78,7 +78,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(mat<4, 4, T, P> const & m, vec<3, T, P> const & v) { - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0] = m[0] * v[0]; Result[1] = m[1] * v[1]; Result[2] = m[2] * v[2]; diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 0af0005d..40387e30 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -280,14 +280,14 @@ namespace detail GLM_FUNC_QUALIFIER static vec<1, uint16, P> pack(vec<1, float, P> const & v) { int16 const Unpack(detail::toFloat16(v.x)); - u16vec1 Packed(uninitialize); + u16vec1 Packed; memcpy(&Packed, &Unpack, sizeof(Packed)); return Packed; } GLM_FUNC_QUALIFIER static vec<1, float, P> unpack(vec<1, uint16, P> const & v) { - i16vec1 Unpack(uninitialize); + i16vec1 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); return vec<1, float, P>(detail::toFloat32(v.x)); } @@ -299,14 +299,14 @@ namespace detail GLM_FUNC_QUALIFIER static vec<2, uint16, P> pack(vec<2, float, P> const & v) { vec<2, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y)); - u16vec2 Packed(uninitialize); + u16vec2 Packed; memcpy(&Packed, &Unpack, sizeof(Packed)); return Packed; } GLM_FUNC_QUALIFIER static vec<2, float, P> unpack(vec<2, uint16, P> const & v) { - i16vec2 Unpack(uninitialize); + i16vec2 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); return vec<2, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y)); } @@ -318,14 +318,14 @@ namespace detail GLM_FUNC_QUALIFIER static vec<3, uint16, P> pack(vec<3, float, P> const & v) { vec<3, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z)); - u16vec3 Packed(uninitialize); + u16vec3 Packed; memcpy(&Packed, &Unpack, sizeof(Packed)); return Packed; } GLM_FUNC_QUALIFIER static vec<3, float, P> unpack(vec<3, uint16, P> const & v) { - i16vec3 Unpack(uninitialize); + i16vec3 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); return vec<3, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z)); } @@ -337,14 +337,14 @@ namespace detail GLM_FUNC_QUALIFIER static vec<4, uint16, P> pack(vec<4, float, P> const & v) { vec<4, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w)); - u16vec4 Packed(uninitialize); + u16vec4 Packed; memcpy(&Packed, &Unpack, sizeof(Packed)); return Packed; } GLM_FUNC_QUALIFIER static vec<4, float, P> unpack(vec<4, uint16, P> const & v) { - i16vec4 Unpack(uninitialize); + i16vec4 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); return vec<4, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z), detail::toFloat32(v.w)); } @@ -373,7 +373,7 @@ namespace detail GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p) { - u8vec2 Unpack(uninitialize); + u8vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return vec2(Unpack) * float(0.0039215686274509803921568627451); // 1 / 255 } @@ -405,7 +405,7 @@ namespace detail GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p) { - i8vec2 Unpack(uninitialize); + i8vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( vec2(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f @@ -433,7 +433,7 @@ namespace detail GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p) { - u16vec4 Unpack(uninitialize); + u16vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return vec4(Unpack) * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 } @@ -465,7 +465,7 @@ namespace detail GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p) { - i16vec4 Unpack(uninitialize); + i16vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( vec4(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, @@ -501,7 +501,7 @@ namespace detail GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v) { - i16vec4 Unpack(uninitialize); + i16vec4 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); return vec4( detail::toFloat32(Unpack.x), @@ -803,7 +803,7 @@ namespace detail GLM_FUNC_QUALIFIER i8vec2 unpackInt2x8(int16 p) { - i8vec2 Unpack(uninitialize); + i8vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -817,7 +817,7 @@ namespace detail GLM_FUNC_QUALIFIER u8vec2 unpackUint2x8(uint16 p) { - u8vec2 Unpack(uninitialize); + u8vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -831,7 +831,7 @@ namespace detail GLM_FUNC_QUALIFIER i8vec4 unpackInt4x8(int32 p) { - i8vec4 Unpack(uninitialize); + i8vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -845,7 +845,7 @@ namespace detail GLM_FUNC_QUALIFIER u8vec4 unpackUint4x8(uint32 p) { - u8vec4 Unpack(uninitialize); + u8vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -859,7 +859,7 @@ namespace detail GLM_FUNC_QUALIFIER i16vec2 unpackInt2x16(int p) { - i16vec2 Unpack(uninitialize); + i16vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -873,7 +873,7 @@ namespace detail GLM_FUNC_QUALIFIER i16vec4 unpackInt4x16(int64 p) { - i16vec4 Unpack(uninitialize); + i16vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -887,7 +887,7 @@ namespace detail GLM_FUNC_QUALIFIER u16vec2 unpackUint2x16(uint p) { - u16vec2 Unpack(uninitialize); + u16vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -901,7 +901,7 @@ namespace detail GLM_FUNC_QUALIFIER u16vec4 unpackUint4x16(uint64 p) { - u16vec4 Unpack(uninitialize); + u16vec4 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -915,7 +915,7 @@ namespace detail GLM_FUNC_QUALIFIER i32vec2 unpackInt2x32(int64 p) { - i32vec2 Unpack(uninitialize); + i32vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } @@ -929,7 +929,7 @@ namespace detail GLM_FUNC_QUALIFIER u32vec2 unpackUint2x32(uint64 p) { - u32vec2 Unpack(uninitialize); + u32vec2 Unpack; memcpy(&Unpack, &p, sizeof(Unpack)); return Unpack; } diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index de8d2050..3f1041e1 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -84,7 +84,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor); GLM_FUNC_DECL GLM_CONSTEXPR tquat(T s, vec<3, T, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR tquat(T w, T x, T y, T z); diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index cbe4667d..e0e4bd41 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -104,10 +104,6 @@ namespace detail // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tquat::tquat(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat::tquat(T s, vec<3, T, P> const& v) : x(v.x), y(v.y), z(v.z), w(s) @@ -649,7 +645,7 @@ namespace detail T biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5); T mult = static_cast(0.25) / biggestVal; - tquat Result(uninitialize); + tquat Result; switch(biggestIndex) { case 0: @@ -709,7 +705,7 @@ namespace detail template GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, vec<3, T, P> const & v) { - tquat Result(uninitialize); + tquat Result; T const a(angle); T const s = glm::sin(a * static_cast(0.5)); @@ -724,7 +720,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] < y[i]; return Result; @@ -733,7 +729,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] <= y[i]; return Result; @@ -742,7 +738,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] > y[i]; return Result; @@ -751,7 +747,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] >= y[i]; return Result; @@ -760,7 +756,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] == y[i]; return Result; @@ -769,7 +765,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat const & x, tquat const & y) { - vec<4, bool, P> Result(uninitialize); + vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] != y[i]; return Result; diff --git a/glm/gtc/quaternion_simd.inl b/glm/gtc/quaternion_simd.inl index f0f22b5f..4f86fc5b 100644 --- a/glm/gtc/quaternion_simd.inl +++ b/glm/gtc/quaternion_simd.inl @@ -51,7 +51,7 @@ namespace detail // //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0)); - tquat Result(uninitialize); + tquat Result; _mm_store_ss(&Result.x, add4); _mm_store_ss(&Result.y, add5); _mm_store_ss(&Result.z, add6); @@ -75,7 +75,7 @@ namespace detail { static tquat call(tquat const& q, tquat const& p) { - tquat Result(uninitialize); + tquat Result; Result.data = _mm_add_ps(q.data, p.data); return Result; } @@ -87,7 +87,7 @@ namespace detail { static tquat call(tquat const & a, tquat const & b) { - tquat Result(uninitialize); + tquat Result; Result.data = _mm256_add_pd(a.data, b.data); return Result; } @@ -99,7 +99,7 @@ namespace detail { static tquat call(tquat const& q, tquat const& p) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_sub_ps(q.data, p.data); return Result; } @@ -111,7 +111,7 @@ namespace detail { static tquat call(tquat const & a, tquat const & b) { - tquat Result(uninitialize); + tquat Result; Result.data = _mm256_sub_pd(a.data, b.data); return Result; } @@ -123,7 +123,7 @@ namespace detail { static tquat call(tquat const& q, float s) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s)); return Result; } @@ -135,7 +135,7 @@ namespace detail { static tquat call(tquat const& q, double s) { - tquat Result(uninitialize); + tquat Result; Result.data = _mm256_mul_pd(q.data, _mm_set_ps1(s)); return Result; } @@ -147,7 +147,7 @@ namespace detail { static tquat call(tquat const& q, float s) { - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_div_ps(q.data, _mm_set_ps1(s)); return Result; } @@ -159,7 +159,7 @@ namespace detail { static tquat call(tquat const& q, double s) { - tquat Result(uninitialize); + tquat Result; Result.data = _mm256_div_pd(q.data, _mm_set_ps1(s)); return Result; } @@ -186,7 +186,7 @@ namespace detail uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two)); uuv = _mm_mul_ps(uuv, two); - vec<4, float, P> Result(uninitialize); + vec<4, float, P> Result; Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv)); return Result; } diff --git a/glm/gtc/ulp.inl b/glm/gtc/ulp.inl index c5fb0cad..be7e385b 100644 --- a/glm/gtc/ulp.inl +++ b/glm/gtc/ulp.inl @@ -202,7 +202,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType next_float(vecType const & x) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = next_float(x[i]); return Result; @@ -237,7 +237,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = prev_float(x[i]); return Result; @@ -255,7 +255,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType next_float(vecType const & x, vecType const & ulps) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = next_float(x[i], ulps[i]); return Result; @@ -273,7 +273,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x, vecType const & ulps) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = prev_float(x[i], ulps[i]); return Result; @@ -313,7 +313,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType float_distance(vecType const & x, vecType const & y) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = float_distance(x[i], y[i]); return Result; diff --git a/glm/gtx/associated_min_max.inl b/glm/gtx/associated_min_max.inl index 23a7fffd..94bb3da2 100644 --- a/glm/gtx/associated_min_max.inl +++ b/glm/gtx/associated_min_max.inl @@ -17,7 +17,7 @@ GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin vecType const& y, vecType const & b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] < y[i] ? a[i] : b[i]; return Result; @@ -30,7 +30,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin T y, const vecType& b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x < y ? a[i] : b[i]; return Result; @@ -43,7 +43,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const& y, U b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] < y[i] ? a : b; return Result; @@ -70,7 +70,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const& z, vecType const & c ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); return Result; @@ -104,7 +104,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const& w, vecType const & d ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { T Test1 = min(x[i], y[i]); @@ -129,7 +129,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin T Test1 = min(x, y); T Test2 = min(z, w); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { U Result1 = x < y ? a[i] : b[i]; @@ -149,7 +149,7 @@ GLM_FUNC_QUALIFIER vecType associatedMin vecType const& w, U d ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { T Test1 = min(x[i], y[i]); @@ -176,7 +176,7 @@ GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax vecType const& y, vecType const & b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] > y[i] ? a[i] : b[i]; return Result; @@ -190,7 +190,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax T y, vecType const & b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x > y ? a[i] : b[i]; return Result; @@ -204,7 +204,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const& y, U b ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] > y[i] ? a : b; return Result; @@ -232,7 +232,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const& z, vecType const & c ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); return Result; @@ -247,7 +247,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax T z, vecType const & c ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); return Result; @@ -262,7 +262,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const& z, U c ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); return Result; @@ -296,7 +296,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const& w, vecType const & d ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { T Test1 = max(x[i], y[i]); @@ -321,7 +321,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax T Test1 = max(x, y); T Test2 = max(z, w); - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { U Result1 = x > y ? a[i] : b[i]; @@ -341,7 +341,7 @@ GLM_FUNC_QUALIFIER vecType associatedMax vecType const& w, U d ) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = Result.length(); i < n; ++i) { T Test1 = max(x[i], y[i]); diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index cf74f4a7..b7cc311c 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -63,7 +63,6 @@ namespace glm // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tdualquat(ctor); GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real); GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & orientation, vec<3, T, P> const & translation); GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real, tquat const & dual); diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index 031e4976..9e4b8cf9 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -47,10 +47,6 @@ namespace glm // -- Explicit basic constructors -- - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tdualquat::tdualquat(ctor) - {} - template GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & r) : real(r), dual(tquat(0, 0, 0, 0)) @@ -305,7 +301,7 @@ namespace glm template GLM_FUNC_QUALIFIER tdualquat dualquat_cast(mat<3, 4, T, P> const & x) { - tquat real(uninitialize); + tquat real; T const trace = x[0].x + x[1].y + x[2].z; if(trace > static_cast(0)) @@ -345,7 +341,7 @@ namespace glm real.w = (x[1].x - x[0].y) * invr; } - tquat dual(uninitialize); + tquat dual; dual.x = static_cast(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y); dual.y = static_cast(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x); dual.z = static_cast(0.5) * ( x[0].w * real.y - x[1].w * real.x + x[2].w * real.w); diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index 54fcfcc9..b11c3524 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -28,7 +28,7 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER vecType fastPow(vecType const & x, vecType const & y) { - vecType Result(uninitialize); + vecType Result; for(length_t i = 0, n = x.length(); i < n; ++i) Result[i] = fastPow(x[i], y[i]); return Result; diff --git a/glm/gtx/matrix_factorisation.inl b/glm/gtx/matrix_factorisation.inl index 90fb7857..7f2418c0 100644 --- a/glm/gtx/matrix_factorisation.inl +++ b/glm/gtx/matrix_factorisation.inl @@ -16,7 +16,7 @@ namespace glm template class matType> GLM_FUNC_QUALIFIER matType fliplr(matType const& in) { - matType out(uninitialize); + matType out; for (length_t i = 0; i < C; i++) { out[i] = in[(C - i) - 1]; diff --git a/glm/gtx/matrix_transform_2d.inl b/glm/gtx/matrix_transform_2d.inl index 97ac720b..4b72896b 100644 --- a/glm/gtx/matrix_transform_2d.inl +++ b/glm/gtx/matrix_transform_2d.inl @@ -27,7 +27,7 @@ namespace glm T const c = cos(a); T const s = sin(a); - mat<3, 3, T, P> Result(uninitialize); + mat<3, 3, T, P> Result; Result[0] = m[0] * c + m[1] * s; Result[1] = m[0] * -s + m[1] * c; Result[2] = m[2]; @@ -39,7 +39,7 @@ namespace glm mat<3, 3, T, P> const& m, vec<2, T, P> const & v) { - mat<3, 3, T, P> Result(uninitialize); + mat<3, 3, T, P> Result; Result[0] = m[0] * v[0]; Result[1] = m[1] * v[1]; Result[2] = m[2]; diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index a3b94a4b..13e73eba 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -228,7 +228,7 @@ namespace glm template GLM_FUNC_QUALIFIER tquat quatLookAtRH(tvec3 const& direction, tvec3 const& up) { - tmat3x3 Result(uninitialize); + tmat3x3 Result; Result[2] = -normalize(direction); Result[0] = normalize(cross(up, Result[2])); @@ -240,7 +240,7 @@ namespace glm template GLM_FUNC_QUALIFIER tquat quatLookAtLH(tvec3 const& direction, tvec3 const& up) { - tmat3x3 Result(uninitialize); + tmat3x3 Result; Result[2] = normalize(direction); Result[0] = normalize(cross(up, Result[2])); diff --git a/glm/gtx/rotate_normalized_axis.inl b/glm/gtx/rotate_normalized_axis.inl index 6cfb21b2..0727fbd0 100644 --- a/glm/gtx/rotate_normalized_axis.inl +++ b/glm/gtx/rotate_normalized_axis.inl @@ -19,7 +19,7 @@ namespace glm vec<3, T, P> const temp((static_cast(1) - c) * axis); - mat<4, 4, T, P> Rotate(uninitialize); + mat<4, 4, T, P> Rotate; Rotate[0][0] = c + temp[0] * axis[0]; Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; @@ -32,7 +32,7 @@ namespace glm Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; Rotate[2][2] = c + temp[2] * axis[2]; - mat<4, 4, T, P> Result(uninitialize); + mat<4, 4, T, P> Result; Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; diff --git a/glm/simd/matrix.h b/glm/simd/matrix.h index df5a5be2..23cf4806 100644 --- a/glm/simd/matrix.h +++ b/glm/simd/matrix.h @@ -1008,7 +1008,7 @@ GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float c Result[2] = TmpC4; Result[3] = _mm_set_ps(1, 0, 0, 0); - //mat<4, 4, valType> Result(uninitialize); + //mat<4, 4, valType> Result; //Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; //Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; //Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; diff --git a/readme.md b/readme.md index 7a6a8e90..45b22e06 100644 --- a/readme.md +++ b/readme.md @@ -102,6 +102,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Removed GLM_DEPTH_ZERO_TO_ONE, use GLM_FORCE_DEPTH_ZERO_TO_ONE instead - Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead - Removed GLM_FORCE_NO_CTOR_INIT +- Removed glm::uninitialize --- ### [GLM 0.9.8.5](https://github.com/g-truc/glm/tree/0.9.8) - 2017-0X-XX diff --git a/test/gtc/gtc_integer.cpp b/test/gtc/gtc_integer.cpp index 302ceec1..1e207581 100644 --- a/test/gtc/gtc_integer.cpp +++ b/test/gtc/gtc_integer.cpp @@ -94,7 +94,7 @@ namespace log2_ for(std::size_t i = 0; i < Count; ++i) { - glm::vec<4, unsigned long, glm::defaultp> Tmp(glm::uninitialize); + glm::vec<4, unsigned long, glm::defaultp> Tmp; _BitScanReverse(&Tmp.x, i); _BitScanReverse(&Tmp.y, i); _BitScanReverse(&Tmp.z, i);