From 78213075654a688e9da6bc49f7f873d25c26d12c Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 10 Apr 2024 08:52:08 +0200 Subject: [PATCH] update single include file --- single_include/entt/entt.hpp | 91 ++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/single_include/entt/entt.hpp b/single_include/entt/entt.hpp index 3f06ce52ad..b3a763a203 100644 --- a/single_include/entt/entt.hpp +++ b/single_include/entt/entt.hpp @@ -19,7 +19,7 @@ #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -127,7 +127,7 @@ #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -169,7 +169,7 @@ #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -296,7 +296,7 @@ #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -5248,7 +5248,7 @@ struct radix_sort { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -10297,7 +10297,7 @@ struct y_combinator { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -10419,7 +10419,7 @@ struct y_combinator { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -19566,7 +19566,7 @@ template #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -19685,7 +19685,7 @@ template #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -24503,11 +24503,12 @@ class basic_sigh_mixin final: public Type { */ template void insert(It first, It last, Args &&...args) { + auto from = underlying_type::size(); underlying_type::insert(first, last, std::forward(args)...); if(auto ® = owner_or_assert(); !construction.empty()) { - for(; first != last; ++first) { - construction.publish(reg, *first); + for(const auto to = underlying_type::size(); from != to; ++from) { + construction.publish(reg, underlying_type::operator[](from)); } } } @@ -25120,7 +25121,7 @@ struct y_combinator { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -25440,7 +25441,7 @@ struct iterable_adaptor final { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -25946,7 +25947,7 @@ class adjacency_matrix { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -26073,7 +26074,7 @@ class adjacency_matrix { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -33474,7 +33475,7 @@ class basic_organizer final { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -33601,7 +33602,7 @@ class basic_organizer final { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -37652,11 +37653,12 @@ class basic_sigh_mixin final: public Type { */ template void insert(It first, It last, Args &&...args) { + auto from = underlying_type::size(); underlying_type::insert(first, last, std::forward(args)...); if(auto ® = owner_or_assert(); !construction.empty()) { - for(; first != last; ++first) { - construction.publish(reg, *first); + for(const auto to = underlying_type::size(); from != to; ++from) { + construction.publish(reg, underlying_type::operator[](from)); } } } @@ -39266,6 +39268,17 @@ class basic_snapshot { for(auto first = storage->data(), last = first + storage->size(); first != last; ++first) { archive(*first); } + } else if constexpr(component_traits::in_place_delete) { + const typename registry_type::common_type &base = *storage; + + for(auto it = base.rbegin(), last = base.rend(); it != last; ++it) { + if(const auto entt = *it; entt == tombstone) { + archive(static_cast(null)); + } else { + archive(entt); + std::apply([&archive](auto &&...args) { (archive(std::forward(args)), ...); }, storage->get_as_tuple(entt)); + } + } } else { for(auto elem: storage->reach()) { std::apply([&archive](auto &&...args) { (archive(std::forward(args)), ...); }, elem); @@ -42958,7 +42971,7 @@ basic_view(std::tuple, std::tuple = {}) -> basic_view>: entt::value_list_e #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -67799,7 +67812,7 @@ using invoke_result_t = typename std::invoke_result::type; #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -71975,7 +71988,7 @@ struct process_adaptor: process, Delta>, private Fu #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -72102,7 +72115,7 @@ struct process_adaptor: process, Delta>, private Fu #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -74114,7 +74127,7 @@ class basic_scheduler { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -74241,7 +74254,7 @@ class basic_scheduler { #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -78028,7 +78041,7 @@ struct uses_allocator, Allocator> #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -80653,7 +80666,7 @@ template #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -80772,7 +80785,7 @@ template #define ENTT_VERSION_MAJOR 3 #define ENTT_VERSION_MINOR 13 -#define ENTT_VERSION_PATCH 1 +#define ENTT_VERSION_PATCH 2 #define ENTT_VERSION \ ENTT_XSTR(ENTT_VERSION_MAJOR) \ @@ -82219,7 +82232,7 @@ delegate(Ret (*)(const void *, Args...), const void * = nullptr) -> delegate delegate