From f60c3734e38408b97e10e29a6c1d8780770d5b79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Feb 2023 07:29:42 +0100 Subject: compat/prelude: add operator""_uz() for size_t --- entity/erased-constraints.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'entity') diff --git a/entity/erased-constraints.cpp b/entity/erased-constraints.cpp index 2ac049d5..52bb784a 100644 --- a/entity/erased-constraints.cpp +++ b/entity/erased-constraints.cpp @@ -24,7 +24,7 @@ template std::pair range::convert() const using U = typename T::Type; constexpr auto Size = T::Size; T a, b; - for (std::size_t i = 0; i < Size; i++) + for (auto i = 0_uz; i < Size; i++) a[i] = std::numeric_limits::min(), b[i] = std::numeric_limits::max(); return {a, b}; } @@ -65,14 +65,14 @@ template std::pair range::convert() const if constexpr(std::is_signed_v) { fm_assert(type == type_int4); - for (std::size_t i = 0; i < Size; i++) + for (auto i = 0_uz; i < Size; i++) a[i] = U(min.i4[i]), b[i] = U(max.i4[i]); } else { if (type == type_int4) { - for (std::size_t i = 0; i < Size; i++) + for (auto i = 0_uz; i < Size; i++) { fm_assert(min.i4[i] >= 0 && max.i4[i] >= 0); a[i] = U(min.i4[i]), b[i] = U(max.i4[i]); @@ -81,7 +81,7 @@ template std::pair range::convert() const else { fm_assert(type == type_uint4); - for (std::size_t i = 0; i < Size; i++) + for (auto i = 0_uz; i < Size; i++) a[i] = U(min.u4[i]), b[i] = U(max.u4[i]); } } @@ -90,7 +90,7 @@ template std::pair range::convert() const { static_assert(std::is_floating_point_v); fm_assert(type == type_float4); - for (std::size_t i = 0; i < Size; i++) + for (auto i = 0_uz; i < Size; i++) a[i] = U(min.f4[i]), b[i] = U(max.f4[i]); } return { a, b }; -- cgit v1.2.3