summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hole-cut.cpp5
-rw-r--r--src/hole-cut.hpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/hole-cut.cpp b/src/hole-cut.cpp
index 0b6d1bd1..70f4ad34 100644
--- a/src/hole-cut.cpp
+++ b/src/hole-cut.cpp
@@ -213,12 +213,13 @@ template<typename T> Cr<T> CutResult<T>::cutʹ(Vec2 r0, Vec2 r1, Vec2 h0, Vec2 h
return cut_rectangleʹ<T>(r0, r1, h0, h1, s);
}
-template<typename T> Cr<T> CutResult<T>::cut(bbox input, bbox hole) { return cut_rectangle<T>(input, hole); }
+template<typename T> Cr<T> CutResult<T>::cut(bbox input, bbox hole) requires std::is_signed_v<T> { return cut_rectangle<T>(input, hole); }
template<typename T> Cr<T> CutResult<T>::cut(Vec2 r0, Vec2 r1, Vec2 h0, Vec2 h1) { return cut_rectangle<T>(r0, r1, h0, h1); }
template<typename T> bool CutResult<T>::found() const { return s != (uint8_t)-1; }
-template struct CutResult<Int>;
+template struct CutResult<uint32_t>;
+template struct CutResult<int32_t>;
template struct CutResult<float>;
} // namespace floormat
diff --git a/src/hole-cut.hpp b/src/hole-cut.hpp
index 6f4d5876..4ec5c168 100644
--- a/src/hole-cut.hpp
+++ b/src/hole-cut.hpp
@@ -12,7 +12,7 @@ struct CutResult
struct bbox { Vec2 position; Vector2ub bbox_size; };
struct rect { Vec2 min, max; };
- static CutResult cut(bbox input, bbox hole);
+ static CutResult cut(bbox input, bbox hole) requires std::is_signed_v<T>;
static CutResult cut(Vec2 r0, Vec2 r1, Vec2 h0, Vec2 h1);
static CutResult cutʹ(Vec2 r0, Vec2 r1, Vec2 h0, Vec2 h1, uint8_t s);