summaryrefslogtreecommitdiff
path: root/src/common/vector_math.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-09-15 23:17:48 -0700
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-09-29 21:11:36 -0700
commit6219654ded53c680cc34f17ff89abee8187111c8 (patch)
tree8665e1e7520d36cf575c1013b6538e821b1056ab /src/common/vector_math.h
parent26b68313b90d3aa47c9f6cfcc4c86cfc11d48a28 (diff)
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.
Diffstat (limited to 'src/common/vector_math.h')
-rw-r--r--src/common/vector_math.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index 2d56f168c..a57d86d88 100644
--- a/src/common/vector_math.h
+++ b/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>