Browse Source

Fixed build

Christophe Riccio 7 years ago
parent
commit
26be7bda82
5 changed files with 23 additions and 8 deletions
  1. 1 1
      glm/gtx/io.hpp
  2. 1 1
      glm/gtx/io.inl
  3. 11 2
      test/core/core_force_xyzw_only.cpp
  4. 6 0
      test/ext/ext_scalar_relational.cpp
  5. 4 4
      test/gtx/gtx_io.cpp

+ 1 - 1
glm/gtx/io.hpp

@@ -163,7 +163,7 @@ namespace glm
 	}//namespace io
 
 	template<typename CTy, typename CTr, typename T, qualifier Q>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T, Q> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, qua<T, Q> const&);
 	template<typename CTy, typename CTr, typename T, qualifier Q>
 	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<1, T, Q> const&);
 	template<typename CTy, typename CTr, typename T, qualifier Q>

+ 1 - 1
glm/gtx/io.inl

@@ -195,7 +195,7 @@ namespace detail
 }//namespace detail
 
 	template<typename CTy, typename CTr, typename T, qualifier Q>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T, Q> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, qua<T, Q> const& a)
 	{
 		return detail::print_vector_on(os, a);
 	}

+ 11 - 2
test/core/core_force_xyzw_only.cpp

@@ -1,11 +1,13 @@
 #define GLM_FORCE_XYZW_ONLY
 
+#include <glm/gtc/constants.hpp>
+#include <glm/ext/vector_relational.hpp>
 #include <glm/ext/vec1.hpp>
 #include <glm/vec2.hpp>
 #include <glm/vec3.hpp>
 #include <glm/vec4.hpp>
 
-int test_comp()
+static int test_comp()
 {
 	int Error = 0;
 
@@ -38,12 +40,19 @@ int test_comp()
 	return Error;
 }
 
+static int test_constexpr()
+{
+	int Error = 0;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
 
 	Error += test_comp();
+	Error += test_constexpr();
 
 	return Error;
 }
-

+ 6 - 0
test/ext/ext_scalar_relational.cpp

@@ -2,6 +2,9 @@
 
 int test_equal()
 {
+	static_assert(glm::equal(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
+	static_assert(!glm::equal(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
+
 	int Error = 0;
 
 	Error += glm::equal(1.01f, 1.02f, 0.1f) ? 0 : 1;
@@ -12,6 +15,9 @@ int test_equal()
 
 int test_notEqual()
 {
+	static_assert(glm::notEqual(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
+	static_assert(!glm::notEqual(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
+
 	int Error = 0;
 
 	Error += glm::notEqual(1.01f, 1.02f, 0.001f) ? 0 : 1;

+ 4 - 4
test/gtx/gtx_io.cpp

@@ -36,7 +36,7 @@ namespace
 	{
 		std::basic_ostringstream<CTy,CTr> ostr;
 
-		if      (typeid(T) == typeid(glm::tquat<U,P>))   { ostr << "quat"; }
+		if      (typeid(T) == typeid(glm::qua<U,P>))   { ostr << "quat"; }
 		else if (typeid(T) == typeid(glm::vec<2, U,P>))   { ostr << "vec2"; }
 		else if (typeid(T) == typeid(glm::vec<3, U,P>))   { ostr << "vec3"; }
 		else if (typeid(T) == typeid(glm::vec<4, U,P>))   { ostr << "vec4"; }
@@ -62,20 +62,20 @@ int test_io_quat(OS& os)
 {
 	os << '\n' << typeid(OS).name() << '\n';
 
-	glm::tquat<T,P> const q(1, 0, 0, 0);
+	glm::qua<T, P> const q(1, 0, 0, 0);
 
 	{
 		glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
 
 		os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
-			<< type_name<T,P>(os, q) << ": " << q << '\n';
+			<< type_name<T, P>(os, q) << ": " << q << '\n';
 	}
 
 	{
 		glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
 
 		os << glm::io::unformatted
-			<< type_name<T,P>(os, q) << ": " << q << '\n';
+			<< type_name<T, P>(os, q) << ": " << q << '\n';
 	}
 
 	return 0;