diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-19 13:36:43 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-19 13:44:33 +0100 |
| commit | eaee8b78edd7b3499ada27d377150be6306f8016 (patch) | |
| tree | f8c16f201eb9b17b6abd2fb3b659f25b8f988e6a /entity | |
| parent | 71b2c6cd30b7715e3678f4bb1ed4fba67f6b797e (diff) | |
entity: whitespace
Diffstat (limited to 'entity')
| -rw-r--r-- | entity/constraints.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
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<U>; enum type_ : unsigned char { type_none, type_float, type_uint, type_int, }; @@ -61,14 +62,16 @@ struct group final { namespace floormat::entities::constraints { -template<typename T> struct range { +template<typename T> struct range +{ using limits = std::numeric_limits<T>; T min = limits::min(), max = limits::max(); constexpr operator erased_constraints::range() const; }; -template<typename T> constexpr range<T>::operator erased_constraints::range() const +template<typename T> +constexpr range<T>::operator erased_constraints::range() const { using enum erased_constraints::range::type_; if constexpr (std::is_floating_point_v<T>) |
