From ab13ab5f71a5b09de3b9526feca2ed7c564cee7e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Feb 2025 05:17:47 +0100 Subject: switch to Corrade pair impl from stl --- entity/constraints.hpp | 7 +++---- entity/erased-constraints.cpp | 12 ++++++------ entity/erased-constraints.hpp | 3 ++- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'entity') diff --git a/entity/constraints.hpp b/entity/constraints.hpp index 6a5587d5..0bfc2f15 100644 --- a/entity/constraints.hpp +++ b/entity/constraints.hpp @@ -1,8 +1,7 @@ #pragma once #include "compat/limits.hpp" #include "erased-constraints.hpp" -#include -#include +#include #include namespace floormat::entities::limit_detail { @@ -52,7 +51,7 @@ template struct range T max = limit_detail::limit_traits::max(); constexpr operator erased_constraints::range() const noexcept; - constexpr operator std::pair() const noexcept; + constexpr operator Pair() const noexcept; constexpr bool operator==(const range&) const noexcept = default; }; @@ -125,7 +124,7 @@ template constexpr range::operator erased_constraints::range() const noexcept { return erased_range_from_range(min, max); } -template constexpr range::operator std::pair() const noexcept { return { min, max }; } +template constexpr range::operator Pair() const noexcept { return { min, max }; } template<> struct range { constexpr operator erased_constraints::range() const noexcept { return {}; } }; template<> struct range { constexpr operator erased_constraints::range() const noexcept { return {}; } }; diff --git a/entity/erased-constraints.cpp b/entity/erased-constraints.cpp index 6e81820a..4cb915dc 100644 --- a/entity/erased-constraints.cpp +++ b/entity/erased-constraints.cpp @@ -2,17 +2,17 @@ #include "compat/assert.hpp" #include #include -#include -#include -#include -#include +#include +#include +#include +#include namespace floormat::entities::erased_constraints { static_assert(sizeof(size_t) == sizeof(uintptr_t)); static_assert(sizeof(size_t) == sizeof(ptrdiff_t)); -template std::pair range::convert() const +template Pair range::convert() const { static_assert(sizeof(T) <= sizeof(min)); @@ -103,7 +103,7 @@ template std::pair range::convert() const } } -template using pair2 = std::pair; +template using pair2 = Pair; template pair2 range::convert() const; template pair2 range::convert() const; diff --git a/entity/erased-constraints.hpp b/entity/erased-constraints.hpp index af050bd6..64b469a3 100644 --- a/entity/erased-constraints.hpp +++ b/entity/erased-constraints.hpp @@ -1,4 +1,5 @@ #pragma once +#include #include #include @@ -25,7 +26,7 @@ struct range final element min, max; type_ type = type_none; - template std::pair convert() const; + template Pair convert() const; friend bool operator==(const range& a, const range& b); }; -- cgit v1.2.3