Browse Source
Merge pull request #900 from lioncash/init
math_util: Always initialize members of Rectangle
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
5 deletions
-
src/common/math_util.h
|
|
@ -19,12 +19,12 @@ inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start |
|
|
|
|
|
|
|
|
template <class T> |
|
|
template <class T> |
|
|
struct Rectangle { |
|
|
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) |
|
|
Rectangle(T left, T top, T right, T bottom) |
|
|
: left(left), top(top), right(right), bottom(bottom) {} |
|
|
: left(left), top(top), right(right), bottom(bottom) {} |
|
|
|