diff options
| author | 2018-08-02 10:47:31 -0400 | |
|---|---|---|
| committer | 2018-08-02 10:47:34 -0400 | |
| commit | f2a03468b17a2c3b7ffc328e4693ea9250a38a61 (patch) | |
| tree | 3bf990ee20f868de9072c212100731d66510ce50 /src/common/math_util.h | |
| parent | Merge pull request #896 from lioncash/audio-out (diff) | |
| download | yuzu-f2a03468b17a2c3b7ffc328e4693ea9250a38a61.tar.gz yuzu-f2a03468b17a2c3b7ffc328e4693ea9250a38a61.tar.xz yuzu-f2a03468b17a2c3b7ffc328e4693ea9250a38a61.zip | |
math_util: Always initialize members of Rectangle
Prevents potentially using the members uninitialized.
Diffstat (limited to 'src/common/math_util.h')
| -rw-r--r-- | src/common/math_util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h index c6a83c953..343cdd902 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h | |||
| @@ -19,12 +19,12 @@ inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start | |||
| 19 | 19 | ||
| 20 | template <class T> | 20 | template <class T> |
| 21 | struct Rectangle { | 21 | struct Rectangle { |
| 22 | T left; | 22 | T left{}; |
| 23 | T top; | 23 | T top{}; |
| 24 | T right; | 24 | T right{}; |
| 25 | T bottom; | 25 | T bottom{}; |
| 26 | 26 | ||
| 27 | Rectangle() {} | 27 | Rectangle() = default; |
| 28 | 28 | ||
| 29 | Rectangle(T left, T top, T right, T bottom) | 29 | Rectangle(T left, T top, T right, T bottom) |
| 30 | : left(left), top(top), right(right), bottom(bottom) {} | 30 | : left(left), top(top), right(right), bottom(bottom) {} |