view: removed multi component view ::size<T> (breaking changes)

This commit is contained in:
Michele Caini
2020-10-05 16:31:55 +02:00
parent 718f964de7
commit c83e7d7995
2 changed files with 0 additions and 15 deletions

View File

@@ -334,19 +334,6 @@ public:
/*! @brief Reverse iterator type. */
using reverse_iterator = view_iterator<typename sparse_set<entity_type>::reverse_iterator>;
/**
* @brief Returns the number of existing components of the given type.
*
* This isn't the number of entities iterated by the view.
*
* @tparam Comp Type of component of which to return the size.
* @return Number of existing components of the given type.
*/
template<typename Comp>
[[nodiscard]] size_type size() const ENTT_NOEXCEPT {
return std::get<pool_type<Comp> *>(pools)->size();
}
/**
* @brief Estimates the number of entities iterated by the view.
* @return Estimated number of entities iterated by the view.

View File

@@ -314,8 +314,6 @@ TEST(MultiComponentView, Functionalities) {
ASSERT_NE(view.rbegin(), view.rend());
ASSERT_NE(cview.rbegin(), cview.rend());
ASSERT_EQ(view.size(), decltype(view.size()){1});
ASSERT_EQ(view.size<int>(), decltype(view.size()){1});
ASSERT_EQ(cview.size<const char>(), decltype(view.size()){2});
registry.get<char>(e0) = '1';
registry.get<char>(e1) = '2';