1
0
Fork 0
forked from suyu/suyu

Merge pull request #900 from lioncash/init

math_util: Always initialize members of Rectangle
This commit is contained in:
bunnei 2018-08-03 11:00:10 -04:00 committed by GitHub
commit ef9433411d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {}