diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-26 10:19:37 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-26 11:12:07 +0200 |
commit | 0978386d9938a7d3f205ec4419bd5213d5f0a579 (patch) | |
tree | b949cf33108e9d55ae32d0a50a404b80a9f1847f /src | |
parent | 67bec06c00b10f57d0d4701a357f29efe7520e3b (diff) |
w a
Diffstat (limited to 'src')
-rw-r--r-- | src/hole.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/hole.cpp b/src/hole.cpp index aba4e7f3..5551b780 100644 --- a/src/hole.cpp +++ b/src/hole.cpp @@ -112,12 +112,10 @@ constexpr element make_element(uint8_t s) } fm_assert(false); } -constexpr auto elements = map(make_element, iota_array<uint8_t, 16>); -static_assert(array_size(elements) == 16); -} // namespace +constexpr auto elements = map(make_element, iota_array<uint8_t, 16>); -constexpr cut_rectangle_result cut_rectangle(bbox input, bbox hole) +constexpr cut_rectangle_result cut_rectangleʹ(bbox input, bbox hole) { auto ihalf = Vector2i{input.bbox_size/2}; auto r0 = input.position - ihalf; @@ -167,10 +165,14 @@ constexpr cut_rectangle_result cut_rectangle(bbox input, bbox hole) res.array[i] = { {x0, y0}, {x1, y1}, }; } - fm_assert(false); - std::unreachable(); + return res; +} + +} // namespace - //return -1; +cut_rectangle_result cut_rectangle(bbox input, bbox hole) +{ + return cut_rectangleʹ(input, hole); } } // namespace floormat |