[ox/std] Hopefully fix MSVC build
All checks were successful
Build / build (push) Successful in 2m41s
All checks were successful
Build / build (push) Successful in 2m41s
This commit is contained in:
parent
e34df255e0
commit
6cf7bf9628
36
deps/ox/src/ox/std/conv.hpp
vendored
36
deps/ox/src/ox/std/conv.hpp
vendored
@ -14,32 +14,20 @@
|
||||
|
||||
namespace ox {
|
||||
|
||||
constexpr Vec2::operator Point() const noexcept {
|
||||
return {
|
||||
static_cast<int32_t>(x),
|
||||
static_cast<int32_t>(y),
|
||||
};
|
||||
}
|
||||
constexpr Point::Point(Vec2 const&pt) noexcept:
|
||||
x(static_cast<int32_t>(pt.x)),
|
||||
y(static_cast<int32_t>(pt.y)) {}
|
||||
|
||||
constexpr Vec2::operator Size() const noexcept {
|
||||
return {
|
||||
static_cast<int32_t>(x),
|
||||
static_cast<int32_t>(y),
|
||||
};
|
||||
}
|
||||
constexpr Size::Size(Vec2 const&pt) noexcept:
|
||||
width(static_cast<int32_t>(pt.x)),
|
||||
height(static_cast<int32_t>(pt.y)) {}
|
||||
|
||||
constexpr Point::operator Vec2() const noexcept {
|
||||
return {
|
||||
static_cast<float>(x),
|
||||
static_cast<float>(y),
|
||||
};
|
||||
}
|
||||
constexpr Vec2::Vec2(Point const&pt) noexcept:
|
||||
x(static_cast<float>(pt.x)),
|
||||
y(static_cast<float>(pt.y)) {}
|
||||
|
||||
constexpr Size::operator Vec2() const noexcept {
|
||||
return {
|
||||
static_cast<float>(width),
|
||||
static_cast<float>(height),
|
||||
};
|
||||
}
|
||||
constexpr Vec2::Vec2(Size const&pt) noexcept:
|
||||
x(static_cast<float>(pt.width)),
|
||||
y(static_cast<float>(pt.height)) {}
|
||||
|
||||
}
|
2
deps/ox/src/ox/std/point.hpp
vendored
2
deps/ox/src/ox/std/point.hpp
vendored
@ -24,6 +24,8 @@ class Point {
|
||||
|
||||
constexpr Point(int x, int y) noexcept;
|
||||
|
||||
explicit constexpr Point(class Vec2 const&pt) noexcept;
|
||||
|
||||
constexpr Point operator+(const Point &p) const noexcept;
|
||||
|
||||
constexpr Point operator-(const Point &p) const noexcept;
|
||||
|
2
deps/ox/src/ox/std/size.hpp
vendored
2
deps/ox/src/ox/std/size.hpp
vendored
@ -24,6 +24,8 @@ class Size {
|
||||
|
||||
constexpr Size(int width, int height) noexcept;
|
||||
|
||||
explicit constexpr Size(class Vec2 const&pt) noexcept;
|
||||
|
||||
constexpr Size operator+(Size p) const noexcept;
|
||||
|
||||
constexpr Size operator-(Size p) const noexcept;
|
||||
|
4
deps/ox/src/ox/std/vec.hpp
vendored
4
deps/ox/src/ox/std/vec.hpp
vendored
@ -142,6 +142,10 @@ class Vec2 {
|
||||
|
||||
constexpr Vec2() noexcept = default;
|
||||
|
||||
explicit constexpr Vec2(class Point const&pt) noexcept;
|
||||
|
||||
explicit constexpr Vec2(class Size const&pt) noexcept;
|
||||
|
||||
template<typename ...Args>
|
||||
constexpr Vec2(float pX, float pY) noexcept: x(pX), y(pY) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user