From 78a3eec9be053a1f82cf2e6235bbaa4deb4a1335 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 28 Feb 2024 18:29:02 +0100 Subject: switch to using unqualified calls to {move,forward,swap} --- entity/metadata.hpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'entity') diff --git a/entity/metadata.hpp b/entity/metadata.hpp index 16a4422d..41c57186 100644 --- a/entity/metadata.hpp +++ b/entity/metadata.hpp @@ -7,13 +7,11 @@ #include "compat/defs.hpp" #include #include -#include #include #include #include #include #include -#include namespace floormat::entities { @@ -36,7 +34,7 @@ constexpr CORRADE_ALWAYS_INLINE void visit_tuple(F&& fun, Tuple&& tuple) fun(std::get(tuple)); if constexpr(N+1 < Size()) - visit_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); + visit_tuple(floormat::forward(fun), floormat::forward(tuple)); } template @@ -49,7 +47,7 @@ constexpr CORRADE_ALWAYS_INLINE bool find_in_tuple(F&& fun, Tuple&& tuple) if (fun(std::get(tuple))) return true; if constexpr(N+1 < Size()) - return find_in_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); + return find_in_tuple(floormat::forward(fun), floormat::forward(tuple)); return false; } @@ -123,7 +121,7 @@ public: static constexpr decltype(auto) read(const R& reader, const Obj& x) { return detail::read_field::read(x, reader); } static constexpr void write(const W& writer, Obj& x, Type v); constexpr decltype(auto) read(const Obj& x) const { return read(reader, x); } - constexpr void write(Obj& x, Type value) const { write(writer, x, Corrade::Utility::move(value)); } + constexpr void write(Obj& x, Type value) const { write(writer, x, move(value)); } static constexpr bool can_write = !std::is_same_v::writer)>; static constexpr field_status is_enabled(const Predicate & p, const Obj& x); @@ -146,7 +144,7 @@ public: template R, FieldWriter W, typename... Ts> constexpr void entity_field::write(const W& writer, Obj& x, Type v) { - static_assert(can_write); detail::write_field::write(x, writer, Corrade::Utility::move(v)); + static_assert(can_write); detail::write_field::write(x, writer, move(v)); } template R, FieldWriter W, typename... Ts> @@ -168,8 +166,8 @@ constexpr erased_accessor entity_field::erased() const constexpr auto writer_fn = [](void* obj, const writer_t* writer, void* value) { auto& obj_ = *reinterpret_cast(obj); const auto& writer_ = *reinterpret_cast(writer); - Type value_ = Corrade::Utility::move(*reinterpret_cast(value)); - write(writer_, obj_, Corrade::Utility::move(value_)); + Type value_ = move(*reinterpret_cast(value)); + write(writer_, obj_, move(value_)); }; constexpr auto predicate_fn = [](const void* obj, const predicate_t* predicate) { const auto& obj_ = *reinterpret_cast(obj); @@ -221,7 +219,7 @@ struct Entity final { struct field final : entity_field { constexpr field(StringView field_name, R r, W w, Ts&&... ts) noexcept : - entity_field{field_name, r, w, Corrade::Utility::forward(ts)...} + entity_field{field_name, r, w, floormat::forward(ts)...} {} }; @@ -235,7 +233,7 @@ constexpr void visit_tuple(F&& fun, Tuple&& tuple) { using Size = std::tuple_size>; if constexpr(Size() > 0) - detail::visit_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); + detail::visit_tuple(floormat::forward(fun), floormat::forward(tuple)); } template @@ -243,7 +241,7 @@ constexpr bool find_in_tuple(F&& fun, Tuple&& tuple) { using Size = std::tuple_size>; if constexpr(Size() > 0) - return detail::find_in_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); + return detail::find_in_tuple(floormat::forward(fun), floormat::forward(tuple)); else return false; } -- cgit v1.2.3