Browse Source

Fixed exact match of initializer lists

Christophe Riccio 12 years ago
parent
commit
e8f1feb423
5 changed files with 5 additions and 5 deletions
  1. 1 1
      glm/core/type_vec1.inl
  2. 1 1
      glm/core/type_vec2.inl
  3. 1 1
      glm/core/type_vec3.inl
  4. 1 1
      glm/core/type_vec4.inl
  5. 1 1
      glm/gtc/quaternion.inl

+ 1 - 1
glm/core/type_vec1.inl

@@ -77,7 +77,7 @@ namespace detail
 	GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(std::initializer_list<U> const & v) :
 		x(static_cast<T>(v.begin()[0]))
 	{
-		assert(v.size() >= this->length());
+		assert(v.size() == this->length());
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS
 

+ 1 - 1
glm/core/type_vec2.inl

@@ -81,7 +81,7 @@ namespace detail
 		x(static_cast<T>(v.begin()[0])),
 		y(static_cast<T>(v.begin()[1]))
 	{
-		assert(v.size() >= this->length());
+		assert(v.size() == this->length());
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS
 

+ 1 - 1
glm/core/type_vec3.inl

@@ -85,7 +85,7 @@ namespace detail
 		y(static_cast<T>(v.begin()[1])),
 		z(static_cast<T>(v.begin()[2]))
 	{
-		assert(v.size() >= this->length());
+		assert(v.size() == this->length());
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS
 

+ 1 - 1
glm/core/type_vec4.inl

@@ -89,7 +89,7 @@ namespace detail
 		z(static_cast<T>(v.begin()[2])),
 		w(static_cast<T>(v.begin()[3]))
 	{
-		assert(v.size() >= this->length());
+		assert(v.size() == this->length());
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS
 

+ 1 - 1
glm/gtc/quaternion.inl

@@ -92,7 +92,7 @@ namespace detail
 		z(static_cast<T>(l.begin()[2])),
 		w(static_cast<T>(l.begin()[3]))
 	{
-		assert(l.size() >= this->length());
+		assert(l.size() == this->length());
 	}
 #endif//GLM_HAS_INITIALIZER_LISTS