Daniele Bartolini 10 gadi atpakaļ
vecāks
revīzija
0a92a494f2
3 mainītis faili ar 13 papildinājumiem un 7 dzēšanām
  1. 4 2
      src/core/math/vector3.h
  2. 5 2
      src/core/math/vector4.h
  3. 4 3
      src/resource/mesh_resource.cpp

+ 4 - 2
src/core/math/vector3.h

@@ -7,7 +7,6 @@
 
 #include "math_types.h"
 #include "math_utils.h"
-#include "vector2.h"
 #include "error.h"
 
 namespace crown
@@ -179,7 +178,10 @@ inline const float* to_float_ptr(const Vector3& a)
 /// Returns the Vector2 portion of @a a. (i.e. truncates z)
 inline Vector2 to_vector2(const Vector3& a)
 {
-	return vector2(a.x, a.y);
+	Vector2 v;
+	v.x = a.x;
+	v.y = a.y;
+	return v;
 }
 
 /// @}

+ 5 - 2
src/core/math/vector4.h

@@ -7,7 +7,6 @@
 
 #include "math_types.h"
 #include "math_utils.h"
-#include "vector3.h"
 #include "error.h"
 
 namespace crown
@@ -196,7 +195,11 @@ inline const float* to_float_ptr(const Vector4& a)
 
 inline Vector3 to_vector3(const Vector4& a)
 {
-	return vector3(a.x, a.y, a.z);
+	Vector3 v;
+	v.x = a.x;
+	v.y = a.y;
+	v.z = a.z;
+	return v;
 }
 
 /// @}

+ 4 - 3
src/resource/mesh_resource.cpp

@@ -12,6 +12,7 @@
 #include "vector3.h"
 #include "resource_manager.h"
 #include "compile_options.h"
+#include "vector2.h"
 
 namespace crown
 {
@@ -25,9 +26,9 @@ namespace mesh_resource
 
 		bool operator==(const MeshVertex& other)
 		{
-			return position == other.position &&
-					normal == other.normal &&
-					texcoord == other.texcoord;
+			return position == other.position
+				&& normal == other.normal
+				&& texcoord == other.texcoord;
 		}
 	};