From ca4ed31fb6c37eb047ecdf17c1b8998440060d5c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 6 Oct 2014 23:35:26 +0200 Subject: [PATCH] Fixed *vec1 scalar constructor --- glm/detail/func_geometric.inl | 2 +- glm/detail/type_vec1.hpp | 3 +-- glm/detail/type_vec1.inl | 11 +++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/glm/detail/func_geometric.inl b/glm/detail/func_geometric.inl index 6122b520..e5c9639c 100644 --- a/glm/detail/func_geometric.inl +++ b/glm/detail/func_geometric.inl @@ -180,7 +180,7 @@ namespace detail ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' only accept floating-point inputs"); - return detail::compute_dot::call(x, y); + return x * y; } template class vecType> diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 64be0cc1..e12dc56d 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -82,13 +82,12 @@ namespace glm GLM_FUNC_DECL tvec1(tvec1 const & v); template GLM_FUNC_DECL tvec1(tvec1 const & v); - template - GLM_FUNC_DECL tvec1(U const & s); ////////////////////////////////////// // Explicit basic constructors GLM_FUNC_DECL explicit tvec1(ctor); + GLM_FUNC_DECL explicit tvec1(T const & s); ////////////////////////////////////// // Conversion vector constructors diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 5ffd4c8f..b5e67971 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -78,12 +78,6 @@ namespace glm x(v.x) {} - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1(U const & s) : - x(static_cast(s)) - {} - ////////////////////////////////////// // Explicit basic constructors @@ -91,6 +85,11 @@ namespace glm GLM_FUNC_QUALIFIER tvec1::tvec1(ctor) {} + template + GLM_FUNC_QUALIFIER tvec1::tvec1(T const & s) : + x(s) + {} + ////////////////////////////////////// // Conversion vector constructors