Browse Source

reduce intelisence warnings

Kolja Strohm 1 tuần trước cách đây
mục cha
commit
9229e3585f
2 tập tin đã thay đổi với 8 bổ sung4 xóa
  1. 2 2
      Array.h
  2. 6 2
      Vec3.h

+ 2 - 2
Array.h

@@ -436,9 +436,9 @@ namespace Framework
                 e->set = e->next->set;
             }
             else
-
+            {
                 e->set = 0;
-
+            }
             ArrayEntry<TYP>* del = e->next;
             if (e->next)
                 e->next = e->next->next;

+ 6 - 2
Vec3.h

@@ -5,7 +5,7 @@
 
 namespace Framework
 {
-    template<typename T>
+    template<typename T, T defaultValue = (T)0>
     //! A 3D vector
     class Vec3
     {
@@ -15,7 +15,11 @@ namespace Framework
         T z; //! Z component of the vector
 
         //! Constructor
-        inline Vec3() {}
+        inline Vec3()
+            : x(defaultValue),
+              y(defaultValue),
+              z(defaultValue)
+        {}
 
         //! Constructor
         //! \param x The X component of the new vector