From f2a03468b17a2c3b7ffc328e4693ea9250a38a61 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 2 Aug 2018 10:47:31 -0400 Subject: math_util: Always initialize members of Rectangle Prevents potentially using the members uninitialized. --- src/common/math_util.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common') 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 template 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) {} -- cgit v1.2.3