summaryrefslogtreecommitdiffhomepage
path: root/entity
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-08 17:05:16 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-08 19:40:10 +0200
commit064379bd0bd929f6b87c50f740e9a783b4d9e054 (patch)
treeb717428ace85bde06fff19ac96b11d95787b538f /entity
parent4eefaf4e12199c071d2e6ee0d99b46d2e1d45557 (diff)
a
Diffstat (limited to 'entity')
-rw-r--r--entity/accessor.hpp2
-rw-r--r--entity/erased-constraints.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/entity/accessor.hpp b/entity/accessor.hpp
index 6bd512f4..9dd9c3b6 100644
--- a/entity/accessor.hpp
+++ b/entity/accessor.hpp
@@ -15,7 +15,7 @@ struct group;
namespace floormat::entities {
-enum class field_status : unsigned char { hidden, readonly, enabled, };
+enum class field_status : unsigned char { hidden, readonly, enabled, COUNT, };
struct erased_accessor final {
using reader_t = void;
diff --git a/entity/erased-constraints.cpp b/entity/erased-constraints.cpp
index bb665307..6e81820a 100644
--- a/entity/erased-constraints.cpp
+++ b/entity/erased-constraints.cpp
@@ -151,15 +151,15 @@ bool operator==(const range& a, const range& b)
switch (a.type)
{
- default: return false;
- case range::type_none: return true;
- case range::type_float: return std::fabs(a.min.f - b.min.f) < eps && std::fabs(a.max.f - b.max.f) < eps;
- case range::type_uint: return a.min.u == b.min.u && a.max.u == b.max.u;
- case range::type_int: return a.min.i == b.min.i && a.max.i == b.max.i;
+ case range::type_none: return true;
+ case range::type_float: return std::fabs(a.min.f - b.min.f) < eps && std::fabs(a.max.f - b.max.f) < eps;
+ case range::type_uint: return a.min.u == b.min.u && a.max.u == b.max.u;
+ case range::type_int: return a.min.i == b.min.i && a.max.i == b.max.i;
case range::type_float4: return a.min.f4 == b.min.f4 && a.max.f4 == b.max.f4;
- case range::type_uint4: return a.min.u4 == b.min.u4 && a.max.u4 == b.max.u4;
- case range::type_int4: return a.min.i4 == b.min.i4 && a.max.i4 == b.max.i4;
+ case range::type_uint4: return a.min.u4 == b.min.u4 && a.max.u4 == b.max.u4;
+ case range::type_int4: return a.min.i4 == b.min.i4 && a.max.i4 == b.max.i4;
}
+ fm_assert(false);
}
} // namespace floormat::entities::erased_constraints