From f5308a69ecb6404b02ca8cae1a49711dfceb2c33 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 23 Aug 2023 18:17:21 +0200 Subject: fix non-pch build --- compat/exception.hpp | 3 ++- compat/format.hpp | 4 ++-- editor/inspect.hpp | 1 + editor/vobj-editor.hpp | 2 ++ entity/metadata.hpp | 20 ++++++++++---------- loader/vobj.cpp | 3 +++ src/chunk-render.cpp | 1 + src/chunk-scenery.cpp | 1 + src/tile-bbox.hpp | 1 + 9 files changed, 23 insertions(+), 13 deletions(-) diff --git a/compat/exception.hpp b/compat/exception.hpp index dd07e483..86a8db21 100644 --- a/compat/exception.hpp +++ b/compat/exception.hpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace floormat { @@ -22,7 +23,7 @@ private: template exception::exception(const Fmt& fmt, Ts&&... args) noexcept { - fmt::format_to(std::back_inserter(buf), fmt, Utility::forward(args)...); + fmt::format_to(std::back_inserter(buf), fmt, Corrade::Utility::forward(args)...); buf.push_back('\0'); } diff --git a/compat/format.hpp b/compat/format.hpp index 45f8a9cb..4fa05f26 100644 --- a/compat/format.hpp +++ b/compat/format.hpp @@ -1,9 +1,9 @@ #pragma once #include #include +#include #include #include -#include namespace fmt { @@ -51,7 +51,7 @@ template size_t snformat(char(&buf)[N], Fmt&& fmt, Xs&&... args) { constexpr size_t n = N > 0 ? N - 1 : 0; - auto result = fmt::format_to_n(buf, n, Utility::forward(fmt), std::forward(args)...); + auto result = fmt::format_to_n(buf, n, Corrade::Utility::forward(fmt), Corrade::Utility::forward(args)...); const auto len = std::min(n, result.size); if constexpr(N > 0) buf[len] = '\0'; diff --git a/editor/inspect.hpp b/editor/inspect.hpp index de572666..5bfb7c1f 100644 --- a/editor/inspect.hpp +++ b/editor/inspect.hpp @@ -1,5 +1,6 @@ #pragma once #include +namespace floormat { struct entity; } namespace floormat::entities { struct erased_accessor; diff --git a/editor/vobj-editor.hpp b/editor/vobj-editor.hpp index e026a498..46b5dce1 100644 --- a/editor/vobj-editor.hpp +++ b/editor/vobj-editor.hpp @@ -1,7 +1,9 @@ #pragma once #include "src/entity-type.hpp" +#include "src/object-id.hpp" #include #include +#include namespace Corrade::Containers { template class BasicStringView; diff --git a/entity/metadata.hpp b/entity/metadata.hpp index 8ad006ac..1902091f 100644 --- a/entity/metadata.hpp +++ b/entity/metadata.hpp @@ -9,11 +9,11 @@ #include #include #include -#include #include #include #include #include +#include namespace floormat::entities { @@ -32,7 +32,7 @@ constexpr CORRADE_ALWAYS_INLINE void visit_tuple(F&& fun, Tuple&& tuple) fun(std::get(tuple)); if constexpr(N+1 < Size()) - visit_tuple(std::forward(fun), std::forward(tuple)); + visit_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); } template @@ -45,7 +45,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(std::forward(fun), std::forward(tuple)); + return find_in_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); return false; } @@ -119,7 +119,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, std::move(value)); } + constexpr void write(Obj& x, Type value) const { write(writer, x, Corrade::Utility::move(value)); } static constexpr bool can_write = !std::is_same_v::writer)>; static constexpr field_status is_enabled(const Predicate & p, const Obj& x); @@ -142,7 +142,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, std::move(v)); + static_assert(can_write); detail::write_field::write(x, writer, Corrade::Utility::move(v)); } template R, FieldWriter W, typename... Ts> @@ -164,8 +164,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_ = std::move(*reinterpret_cast(value)); - write(writer_, obj_, std::move(value_)); + Type value_ = Corrade::Utility::move(*reinterpret_cast(value)); + write(writer_, obj_, Corrade::Utility::move(value_)); }; constexpr auto predicate_fn = [](const void* obj, const predicate_t* predicate) { const auto& obj_ = *reinterpret_cast(obj); @@ -217,7 +217,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, Utility::forward(ts)...} + entity_field{field_name, r, w, Corrade::Utility::forward(ts)...} {} }; @@ -231,7 +231,7 @@ constexpr void visit_tuple(F&& fun, Tuple&& tuple) { using Size = std::tuple_size>; if constexpr(Size() > 0) - detail::visit_tuple(Utility::forward(fun), Utility::forward(tuple)); + detail::visit_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); } template @@ -239,7 +239,7 @@ constexpr bool find_in_tuple(F&& fun, Tuple&& tuple) { using Size = std::tuple_size>; if constexpr(Size() > 0) - return detail::find_in_tuple(Utility::forward(fun), Utility::forward(tuple)); + return detail::find_in_tuple(Corrade::Utility::forward(fun), Corrade::Utility::forward(tuple)); else return false; } diff --git a/loader/vobj.cpp b/loader/vobj.cpp index 75351cd4..fa9c3d73 100644 --- a/loader/vobj.cpp +++ b/loader/vobj.cpp @@ -6,6 +6,9 @@ #include "src/anim.hpp" #include "compat/exception.hpp" #include +#include +#include +#include namespace floormat::loader_detail { struct vobj { diff --git a/src/chunk-render.cpp b/src/chunk-render.cpp index 6dff9a40..281d7207 100644 --- a/src/chunk-render.cpp +++ b/src/chunk-render.cpp @@ -1,6 +1,7 @@ #include "chunk.hpp" #include "tile-atlas.hpp" #include "shaders/shader.hpp" +#include "compat/defs.hpp" #include #include #include diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp index d12a754b..6a3987aa 100644 --- a/src/chunk-scenery.cpp +++ b/src/chunk-scenery.cpp @@ -3,6 +3,7 @@ #include "entity.hpp" #include "anim-atlas.hpp" #include "tile-atlas.hpp" +#include #include #include diff --git a/src/tile-bbox.hpp b/src/tile-bbox.hpp index 3275e22a..ba61f0bf 100644 --- a/src/tile-bbox.hpp +++ b/src/tile-bbox.hpp @@ -1,6 +1,7 @@ #pragma once #include "src/tile-defs.hpp" #include "src/local-coords.hpp" +#include #include #include -- cgit v1.2.3