Explorar o código

Common: Remove dangerous Vec[234] array constructors

They're not currently used, and it's easy to accidentally pass a single
pointer argument to them, causing an out-of-bounds read.
Yuri Kunde Schlesner %!s(int64=9) %!d(string=hai) anos
pai
achega
6219654ded
Modificáronse 1 ficheiros con 0 adicións e 3 borrados
  1. 0 3
      src/common/vector_math.h

+ 0 - 3
src/common/vector_math.h

@@ -60,7 +60,6 @@ public:
     }
 
     Vec2() = default;
-    Vec2(const T a[2]) : x(a[0]), y(a[1]) {}
     Vec2(const T& _x, const T& _y) : x(_x), y(_y) {}
 
     template <typename T2>
@@ -199,7 +198,6 @@ public:
     }
 
     Vec3() = default;
-    Vec3(const T a[3]) : x(a[0]), y(a[1]), z(a[2]) {}
     Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {}
 
     template <typename T2>
@@ -405,7 +403,6 @@ public:
     }
 
     Vec4() = default;
-    Vec4(const T a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {}
     Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {}
 
     template <typename T2>