Browse Source

sparse_set: drop swap_at as it ought to be

Michele Caini 2 years ago
parent
commit
baf0057628
1 changed files with 0 additions and 16 deletions
  1. 0 16
      src/entt/entity/sparse_set.hpp

+ 0 - 16
src/entt/entity/sparse_set.hpp

@@ -227,22 +227,6 @@ protected:
     /*! @brief Random access iterator type. */
     using basic_iterator = internal::sparse_set_iterator<packed_container_type>;
 
-    /**
-     * @brief Swaps two items at specific locations.
-     * @param lhs A position to move from.
-     * @param rhs The other position to move from.
-     */
-    void swap_at(const std::size_t lhs, const std::size_t rhs) {
-        const auto entity = static_cast<typename traits_type::entity_type>(lhs);
-        const auto other = static_cast<typename traits_type::entity_type>(rhs);
-
-        sparse_ref(packed[lhs]) = traits_type::combine(other, traits_type::to_integral(packed[lhs]));
-        sparse_ref(packed[rhs]) = traits_type::combine(entity, traits_type::to_integral(packed[rhs]));
-
-        using std::swap;
-        swap(packed[lhs], packed[rhs]);
-    }
-
     /**
      * @brief Erases an entity from a sparse set.
      * @param it An iterator to the element to pop.