summaryrefslogtreecommitdiffhomepage
path: root/entity/erased-constraints.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-23 09:05:17 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-23 09:05:17 +0100
commit7d4f172bd280e77175f617f36673d99f50580d36 (patch)
tree0b4cd3e8978119e0c38173b70666c68b715ce945 /entity/erased-constraints.cpp
parent06ccfd8b34c702da9ad695982e8210823d7b501c (diff)
wip
Diffstat (limited to 'entity/erased-constraints.cpp')
-rw-r--r--entity/erased-constraints.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/entity/erased-constraints.cpp b/entity/erased-constraints.cpp
index 599b4164..031197eb 100644
--- a/entity/erased-constraints.cpp
+++ b/entity/erased-constraints.cpp
@@ -27,8 +27,16 @@ template<typename T> std::pair<T, T> range::convert() const
}
else
{
- fm_assert(type == type_uint);
- return { T(min.u), T(max.u) };
+ if (type == type_int)
+ {
+ fm_assert(min.i >= 0 && max.i >= 0);
+ return { T(min.i), T(max.i) };
+ }
+ else
+ {
+ fm_assert(type == type_uint);
+ return { T(min.u), T(max.u) };
+ }
}
}
else