From 61e96e2daba8d655a521505e7145b58c2b17d78b Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 30 Dec 2020 18:04:57 +0100 Subject: [PATCH] *: get around an issue with entt::integral_constant on (very) old compilers --- src/entt/entity/organizer.hpp | 4 ++-- src/entt/process/process.hpp | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/entt/entity/organizer.hpp b/src/entt/entity/organizer.hpp index 22fa0d078..e84c52343 100644 --- a/src/entt/entity/organizer.hpp +++ b/src/entt/entity/organizer.hpp @@ -391,7 +391,7 @@ public: callback, +[](const bool rw, type_info *buffer, const std::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); }, +[](basic_registry ®) { void(to_args(reg, typename resource_type::args{})); }, - type_id>() + type_id>() }); } @@ -428,7 +428,7 @@ public: +[](basic_registry ®) { void(to_args(reg, typename resource_type::args{})); }, - type_id>() + type_id>() }); } diff --git a/src/entt/process/process.hpp b/src/entt/process/process.hpp index c5bde8953..3702ed68e 100644 --- a/src/entt/process/process.hpp +++ b/src/entt/process/process.hpp @@ -5,7 +5,6 @@ #include #include #include "../config/config.h" -#include "../core/type_traits.hpp" namespace entt { @@ -83,31 +82,31 @@ class process { }; template - auto next(integral_constant) + auto next(std::integral_constant) -> decltype(std::declval().init(), void()) { static_cast(this)->init(); } template - auto next(integral_constant, Delta delta, void *data) + auto next(std::integral_constant, Delta delta, void *data) -> decltype(std::declval().update(delta, data), void()) { static_cast(this)->update(delta, data); } template - auto next(integral_constant) + auto next(std::integral_constant) -> decltype(std::declval().succeeded(), void()) { static_cast(this)->succeeded(); } template - auto next(integral_constant) + auto next(std::integral_constant) -> decltype(std::declval().failed(), void()) { static_cast(this)->failed(); } template - auto next(integral_constant) + auto next(std::integral_constant) -> decltype(std::declval().aborted(), void()) { static_cast(this)->aborted(); } @@ -230,11 +229,11 @@ public: void tick(const Delta delta, void *data = nullptr) { switch (current) { case state::UNINITIALIZED: - next(integral_constant{}); + next(std::integral_constant{}); current = state::RUNNING; break; case state::RUNNING: - next(integral_constant{}, delta, data); + next(std::integral_constant{}, delta, data); break; default: // suppress warnings @@ -244,16 +243,16 @@ public: // if it's dead, it must be notified and removed immediately switch(current) { case state::SUCCEEDED: - next(integral_constant{}); + next(std::integral_constant{}); current = state::FINISHED; break; case state::FAILED: - next(integral_constant{}); + next(std::integral_constant{}); current = state::FINISHED; stopped = true; break; case state::ABORTED: - next(integral_constant{}); + next(std::integral_constant{}); current = state::FINISHED; stopped = true; break;