sparse_set: prepare to drop swap_at

This commit is contained in:
Michele Caini
2023-08-30 11:28:26 +02:00
parent 4f0a119279
commit a9de9da75b

View File

@@ -868,7 +868,12 @@ public:
// basic no-leak guarantee if swapping throws
swap_or_move(from, to);
swap_at(from, to);
sparse_ref(packed[from]) = traits_type::combine(static_cast<typename traits_type::entity_type>(to), traits_type::to_integral(lhs));
sparse_ref(packed[to]) = traits_type::combine(static_cast<typename traits_type::entity_type>(from), traits_type::to_integral(rhs));
packed[from] = rhs;
packed[to] = lhs;
}
/**