aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-21 01:57:32 -0500
committerLioncash <mathew1800@gmail.com>2018-11-21 02:08:18 -0500
commitfb1339a38522a1cf3bbde5cb327fa0fb8dcd2d7b (patch)
tree5ec7868d11d9a3def3a95a2652a8c073bbfc7ff7
parent60d2e259bbc9037645b2dcc2533761a3ec93bfbb (diff)
common/math_util: Make Rectangle's constructors constexpr
Allows objects that contain rectangle instances to be constexpr constructible as well.
-rw-r--r--src/common/math_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index cbcc414be5..cf5ad8457b 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -18,9 +18,9 @@ struct Rectangle {
T right{};
T bottom{};
- Rectangle() = default;
+ constexpr Rectangle() = default;
- Rectangle(T left, T top, T right, T bottom)
+ constexpr Rectangle(T left, T top, T right, T bottom)
: left(left), top(top), right(right), bottom(bottom) {}
T GetWidth() const {