From 5e9a9fef6edb636b7e6babb743541a18f25bd67f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 16 Apr 2023 12:24:19 +0200 Subject: use Corrade::Utility::move --- src/emplacer.hpp | 3 ++- src/world.hpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emplacer.hpp b/src/emplacer.hpp index eca115e8..d132bd7b 100644 --- a/src/emplacer.hpp +++ b/src/emplacer.hpp @@ -1,5 +1,6 @@ #pragma once #include +#include namespace floormat { @@ -9,7 +10,7 @@ class emplacer { using type = std::decay_t()())>; public: - explicit constexpr emplacer(F&& fun) noexcept : fun{std::forward(fun)} {} + explicit constexpr emplacer(F&& fun) noexcept : fun{Utility::forward(fun)} {} constexpr operator type() const noexcept { return fun(); } }; diff --git a/src/world.hpp b/src/world.hpp index 4871a62c..c176dbbe 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -7,6 +7,7 @@ #include #include #include +#include template<> struct std::hash final { @@ -85,8 +86,8 @@ public: } std::shared_ptr make_entity(object_id id, global_coords pos, Xs&&... xs) { - auto ret = std::shared_ptr(new T{id, operator[](chunk_coords_{pos.chunk(), pos.z()}), std::forward(xs)...}); - do_make_entity(std::static_pointer_cast(ret), pos, sorted); + auto ret = std::shared_ptr(new T{id, operator[](chunk_coords_{pos.chunk(), pos.z()}), Utility::forward(xs)...}); + do_make_entity(static_pointer_cast(ret), pos, sorted); return ret; } @@ -125,7 +126,7 @@ std::shared_ptr world::find_entity(object_id id) { if (!(ptr->type() == entity_type_::value)) [[unlikely]] throw_on_wrong_entity_type(id, ptr->type(), entity_type_::value); - return std::static_pointer_cast(std::move(ptr)); + return static_pointer_cast(Utility::move(ptr)); } } -- cgit v1.2.3