Browse Source

Zero-initialize vectors by default

Andrey Fidrya 10 years ago
parent
commit
dbfe84e865
3 changed files with 6 additions and 3 deletions
  1. 2 1
      oxygine/src/math/vector2.h
  2. 2 1
      oxygine/src/math/vector3.h
  3. 2 1
      oxygine/src/math/vector4.h

+ 2 - 1
oxygine/src/math/vector2.h

@@ -99,7 +99,8 @@ namespace oxygine
     }
 
     template <class T>
-    VectorT2<T>::VectorT2()
+	VectorT2<T>::VectorT2():
+        x(0), y(0)
     {}
 
     template <class T>

+ 2 - 1
oxygine/src/math/vector3.h

@@ -86,7 +86,8 @@ namespace oxygine
     }
 
     template <class T>
-    VectorT3<T>::VectorT3()
+	VectorT3<T>::VectorT3():
+        x(0), y(0), z(0)
     {}
 
     template <class T>

+ 2 - 1
oxygine/src/math/vector4.h

@@ -72,7 +72,8 @@ namespace oxygine
     }
 
     template <class T>
-    VectorT4<T>::VectorT4()
+	VectorT4<T>::VectorT4():
+		x(0), y(0), z(0), w(0)
     {}