From eaee8b78edd7b3499ada27d377150be6306f8016 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 19 Nov 2022 13:36:43 +0100 Subject: entity: whitespace --- entity/constraints.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'entity') diff --git a/entity/constraints.hpp b/entity/constraints.hpp index f8434bd7..248a8422 100644 --- a/entity/constraints.hpp +++ b/entity/constraints.hpp @@ -11,7 +11,8 @@ namespace floormat::entities::erased_constraints { static_assert(sizeof(std::size_t) == sizeof(std::uintptr_t)); static_assert(sizeof(std::size_t) == sizeof(std::ptrdiff_t)); -struct range final { +struct range final +{ using U = std::size_t; using I = std::make_signed_t; enum type_ : unsigned char { type_none, type_float, type_uint, type_int, }; @@ -61,14 +62,16 @@ struct group final { namespace floormat::entities::constraints { -template struct range { +template struct range +{ using limits = std::numeric_limits; T min = limits::min(), max = limits::max(); constexpr operator erased_constraints::range() const; }; -template constexpr range::operator erased_constraints::range() const +template +constexpr range::operator erased_constraints::range() const { using enum erased_constraints::range::type_; if constexpr (std::is_floating_point_v) -- cgit v1.2.3