[studio/modlib] Give Selection constructors

This commit is contained in:
Gary Talent 2024-05-26 02:09:59 -05:00
parent 19a4120113
commit 49b859ecf5

View File

@ -9,7 +9,11 @@
namespace studio { namespace studio {
struct Selection {ox::Point a, b;}; struct Selection {
ox::Point a, b;
constexpr Selection() noexcept = default;
constexpr Selection(ox::Point const&pA, ox::Point const&pB) noexcept: a(pA), b(pB) {}
};
constexpr auto iterateSelection(studio::Selection const&sel, auto const&cb) { constexpr auto iterateSelection(studio::Selection const&sel, auto const&cb) {
constexpr auto retErr = ox::is_same_v<decltype(cb(0, 0)), ox::Error>; constexpr auto retErr = ox::is_same_v<decltype(cb(0, 0)), ox::Error>;