mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-07 07:47:43 +01: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:
1 parent
60d2e259bb
commit
fb1339a385
1 file changed
+2
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user