diff options
| author | 2018-11-21 01:57:32 -0500 | |
|---|---|---|
| committer | 2018-11-21 02:08:18 -0500 | |
| commit | f11173f88cac03eab021d27725805128d046fd0d (patch) | |
| tree | 5ec7868d11d9a3def3a95a2652a8c073bbfc7ff7 /src/common | |
| parent | common/math_util: Remove unnecessary static from PI (diff) | |
| download | yuzu-f11173f88cac03eab021d27725805128d046fd0d.tar.gz yuzu-f11173f88cac03eab021d27725805128d046fd0d.tar.xz yuzu-f11173f88cac03eab021d27725805128d046fd0d.zip | |
common/math_util: Make Rectangle's constructors constexpr
Allows objects that contain rectangle instances to be constexpr
constructible as well.
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/math_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h index cbcc414be..cf5ad8457 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h | |||
| @@ -18,9 +18,9 @@ struct Rectangle { | |||
| 18 | T right{}; | 18 | T right{}; |
| 19 | T bottom{}; | 19 | T bottom{}; |
| 20 | 20 | ||
| 21 | Rectangle() = default; | 21 | constexpr Rectangle() = default; |
| 22 | 22 | ||
| 23 | Rectangle(T left, T top, T right, T bottom) | 23 | constexpr Rectangle(T left, T top, T right, T bottom) |
| 24 | : left(left), top(top), right(right), bottom(bottom) {} | 24 | : left(left), top(top), right(right), bottom(bottom) {} |
| 25 | 25 | ||
| 26 | T GetWidth() const { | 26 | T GetWidth() const { |