diff options
| author | 2018-05-02 09:55:32 -0400 | |
|---|---|---|
| committer | 2018-05-02 09:55:32 -0400 | |
| commit | b1a8e5914bb1651b42933abb5739087e723d83ea (patch) | |
| tree | f971035d59d30b98c8bdad063db6f1e576993422 /src/common | |
| parent | Merge pull request #427 from bunnei/domain-inputs (diff) | |
| parent | vector_math: Ensure members are always initialized (diff) | |
| download | yuzu-b1a8e5914bb1651b42933abb5739087e723d83ea.tar.gz yuzu-b1a8e5914bb1651b42933abb5739087e723d83ea.tar.xz yuzu-b1a8e5914bb1651b42933abb5739087e723d83ea.zip | |
Merge pull request #430 from lioncash/vec
vector_math: Ensure members are always initialized
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/vector_math.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h index 3f15ac1f4..cca43bd4c 100644 --- a/src/common/vector_math.h +++ b/src/common/vector_math.h | |||
| @@ -52,8 +52,8 @@ static inline Vec4<T> MakeVec(const T& x, const T& y, const T& z, const T& w); | |||
| 52 | template <typename T> | 52 | template <typename T> |
| 53 | class Vec2 { | 53 | class Vec2 { |
| 54 | public: | 54 | public: |
| 55 | T x; | 55 | T x{}; |
| 56 | T y; | 56 | T y{}; |
| 57 | 57 | ||
| 58 | Vec2() = default; | 58 | Vec2() = default; |
| 59 | Vec2(const T& _x, const T& _y) : x(_x), y(_y) {} | 59 | Vec2(const T& _x, const T& _y) : x(_x), y(_y) {} |
| @@ -192,9 +192,9 @@ inline float Vec2<float>::Normalize() { | |||
| 192 | template <typename T> | 192 | template <typename T> |
| 193 | class Vec3 { | 193 | class Vec3 { |
| 194 | public: | 194 | public: |
| 195 | T x; | 195 | T x{}; |
| 196 | T y; | 196 | T y{}; |
| 197 | T z; | 197 | T z{}; |
| 198 | 198 | ||
| 199 | Vec3() = default; | 199 | Vec3() = default; |
| 200 | Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {} | 200 | Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {} |
| @@ -392,10 +392,10 @@ typedef Vec3<float> Vec3f; | |||
| 392 | template <typename T> | 392 | template <typename T> |
| 393 | class Vec4 { | 393 | class Vec4 { |
| 394 | public: | 394 | public: |
| 395 | T x; | 395 | T x{}; |
| 396 | T y; | 396 | T y{}; |
| 397 | T z; | 397 | T z{}; |
| 398 | T w; | 398 | T w{}; |
| 399 | 399 | ||
| 400 | Vec4() = default; | 400 | Vec4() = default; |
| 401 | Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {} | 401 | Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {} |