From f11173f88cac03eab021d27725805128d046fd0d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 21 Nov 2018 01:57:32 -0500 Subject: [PATCH] common/math_util: Make Rectangle's constructors constexpr Allows objects that contain rectangle instances to be constexpr constructible as well. --- src/common/math_util.h | 4 ++-- 1 file 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 {