Skip to content

Commit

Permalink
update single include file
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Aug 1, 2022
1 parent 90742a7 commit f8de85b
Showing 1 changed file with 45 additions and 41 deletions.
86 changes: 45 additions & 41 deletions single_include/entt/entt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -120,7 +120,7 @@

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -163,7 +163,7 @@

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -275,7 +275,7 @@

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -4236,7 +4236,7 @@ class dense_set {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -4581,7 +4581,7 @@ struct radix_sort {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -8988,7 +8988,7 @@ struct y_combinator {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -9168,7 +9168,7 @@ inline constexpr bool ignore_as_empty_v = (component_traits<Type>::page_size ==

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -11271,7 +11271,7 @@ struct radix_sort {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -14035,12 +14035,14 @@ class basic_sparse_set {
*/
virtual void swap_and_pop(basic_iterator first, basic_iterator last) {
for(; first != last; ++first) {
sparse_ref(packed.back()) = entity_traits::combine(static_cast<typename entity_traits::entity_type>(first.index()), entity_traits::to_integral(packed.back()));
const auto entt = std::exchange(packed[first.index()], packed.back());
auto &self = sparse_ref(*first);
const auto entt = entity_traits::to_entity(self);
sparse_ref(packed.back()) = entity_traits::combine(entt, entity_traits::to_integral(packed.back()));
packed[static_cast<size_type>(entt)] = packed.back();
// unnecessary but it helps to detect nasty bugs
ENTT_ASSERT((packed.back() = tombstone, true), "");
// lazy self-assignment guard
sparse_ref(entt) = null;
self = null;
packed.pop_back();
}
}
Expand All @@ -14052,8 +14054,8 @@ class basic_sparse_set {
*/
virtual void in_place_pop(basic_iterator first, basic_iterator last) {
for(; first != last; ++first) {
sparse_ref(*first) = null;
packed[first.index()] = std::exchange(free_list, entity_traits::combine(static_cast<typename entity_traits::entity_type>(first.index()), entity_traits::reserved));
const auto entt = entity_traits::to_entity(std::exchange(sparse_ref(*first), null));
packed[static_cast<size_type>(entt)] = std::exchange(free_list, entity_traits::combine(entt, entity_traits::reserved));
}
}

Expand Down Expand Up @@ -15100,7 +15102,7 @@ struct tuple_element<Index, entt::compressed_pair<First, Second>>: conditional<I

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -15223,7 +15225,7 @@ struct tuple_element<Index, entt::compressed_pair<First, Second>>: conditional<I

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -18958,7 +18960,7 @@ class basic_group<Entity, owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -19070,7 +19072,7 @@ class basic_group<Entity, owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -30542,12 +30544,14 @@ class basic_sparse_set {
*/
virtual void swap_and_pop(basic_iterator first, basic_iterator last) {
for(; first != last; ++first) {
sparse_ref(packed.back()) = entity_traits::combine(static_cast<typename entity_traits::entity_type>(first.index()), entity_traits::to_integral(packed.back()));
const auto entt = std::exchange(packed[first.index()], packed.back());
auto &self = sparse_ref(*first);
const auto entt = entity_traits::to_entity(self);
sparse_ref(packed.back()) = entity_traits::combine(entt, entity_traits::to_integral(packed.back()));
packed[static_cast<size_type>(entt)] = packed.back();
// unnecessary but it helps to detect nasty bugs
ENTT_ASSERT((packed.back() = tombstone, true), "");
// lazy self-assignment guard
sparse_ref(entt) = null;
self = null;
packed.pop_back();
}
}
Expand All @@ -30559,8 +30563,8 @@ class basic_sparse_set {
*/
virtual void in_place_pop(basic_iterator first, basic_iterator last) {
for(; first != last; ++first) {
sparse_ref(*first) = null;
packed[first.index()] = std::exchange(free_list, entity_traits::combine(static_cast<typename entity_traits::entity_type>(first.index()), entity_traits::reserved));
const auto entt = entity_traits::to_entity(std::exchange(sparse_ref(*first), null));
packed[static_cast<size_type>(entt)] = std::exchange(free_list, entity_traits::combine(entt, entity_traits::reserved));
}
}

Expand Down Expand Up @@ -33115,7 +33119,7 @@ basic_view(Storage &...storage) -> basic_view<std::common_type_t<typename Storag

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -33391,7 +33395,7 @@ struct adl_meta_pointer_like {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -33503,7 +33507,7 @@ struct adl_meta_pointer_like {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -37459,7 +37463,7 @@ class dense_set {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -37571,7 +37575,7 @@ class dense_set {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -37680,7 +37684,7 @@ class dense_set {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -47668,7 +47672,7 @@ using invoke_result_t = typename std::invoke_result<Func, Args...>::type;

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -47780,7 +47784,7 @@ using invoke_result_t = typename std::invoke_result<Func, Args...>::type;

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -47889,7 +47893,7 @@ using invoke_result_t = typename std::invoke_result<Func, Args...>::type;

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -51160,7 +51164,7 @@ class basic_poly: private Concept::template type<poly_base<basic_poly<Concept, L

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -52221,7 +52225,7 @@ class scheduler {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -52340,7 +52344,7 @@ class scheduler {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -52452,7 +52456,7 @@ class scheduler {

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -55577,7 +55581,7 @@ struct uses_allocator<entt::internal::dense_map_node<Key, Value>, Allocator>

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -57878,7 +57882,7 @@ template<typename Res, typename Other>

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -57990,7 +57994,7 @@ template<typename Res, typename Other>

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -59152,7 +59156,7 @@ delegate(Ret (*)(const void *, Args...), const void * = nullptr) -> delegate<Ret

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down Expand Up @@ -59264,7 +59268,7 @@ delegate(Ret (*)(const void *, Args...), const void * = nullptr) -> delegate<Ret

#define ENTT_VERSION_MAJOR 3
#define ENTT_VERSION_MINOR 10
#define ENTT_VERSION_PATCH 1
#define ENTT_VERSION_PATCH 2

#define ENTT_VERSION \
ENTT_XSTR(ENTT_VERSION_MAJOR) \
Expand Down

0 comments on commit f8de85b

Please sign in to comment.