Skip to content

Commit

Permalink
sparse set: internal changes - close #1194
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 10, 2024
1 parent 49ba7ee commit f6e1b77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/entt/entity/sparse_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ class basic_sparse_set {

static constexpr auto max_size = static_cast<std::size_t>(traits_type::to_entity(null));

[[nodiscard]] auto policy_to_head() const noexcept {
// it could be auto but gcc complains and emits a warning due to a false positive
[[nodiscard]] std::size_t policy_to_head() const noexcept {
return static_cast<size_type>(max_size * static_cast<decltype(max_size)>(mode != deletion_policy::swap_only));
}

Expand Down

0 comments on commit f6e1b77

Please sign in to comment.