diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-02 10:47:31 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-02 10:47:34 -0400 |
commit | f2a03468b17a2c3b7ffc328e4693ea9250a38a61 (patch) | |
tree | 3bf990ee20f868de9072c212100731d66510ce50 /src/common/math_util.h | |
parent | a03c644aed943397f7a4e44715a167e0471b6262 (diff) |
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 c6a83c9539..343cdd902f 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 template <class T> struct Rectangle { - T left; - T top; - T right; - T bottom; + T left{}; + T top{}; + T right{}; + T bottom{}; - Rectangle() {} + Rectangle() = default; Rectangle(T left, T top, T right, T bottom) : left(left), top(top), right(right), bottom(bottom) {} |