mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 01:30:05 +00:00
common/math_util: Make Rectangle's constructors constexpr
Allows objects that contain rectangle instances to be constexpr constructible as well.
This commit is contained in:
parent
cc0801745a
commit
f11173f88c
@ -18,9 +18,9 @@ struct Rectangle {
|
|||||||
T right{};
|
T right{};
|
||||||
T bottom{};
|
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) {}
|
: left(left), top(top), right(right), bottom(bottom) {}
|
||||||
|
|
||||||
T GetWidth() const {
|
T GetWidth() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user