Przeglądaj źródła

view/group: minor changes

Michele Caini 5 lat temu
rodzic
commit
fca08a5162
2 zmienionych plików z 8 dodań i 8 usunięć
  1. 6 6
      src/entt/entity/group.hpp
  2. 2 2
      src/entt/entity/view.hpp

+ 6 - 6
src/entt/entity/group.hpp

@@ -134,7 +134,7 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>> {
 
 
         [[nodiscard]] iterator begin() const ENTT_NOEXCEPT {
         [[nodiscard]] iterator begin() const ENTT_NOEXCEPT {
             return proxy_iterator{handler->begin(), std::tuple_cat([](auto *cpool) {
             return proxy_iterator{handler->begin(), std::tuple_cat([](auto *cpool) {
-                if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                     return std::make_tuple();
                     return std::make_tuple();
                 } else {
                 } else {
                     return std::make_tuple(cpool);
                     return std::make_tuple(cpool);
@@ -144,7 +144,7 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>> {
 
 
         [[nodiscard]] iterator end() const ENTT_NOEXCEPT {
         [[nodiscard]] iterator end() const ENTT_NOEXCEPT {
             return proxy_iterator{handler->end(), std::tuple_cat([](auto *cpool) {
             return proxy_iterator{handler->end(), std::tuple_cat([](auto *cpool) {
-                if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                     return std::make_tuple();
                     return std::make_tuple();
                 } else {
                 } else {
                     return std::make_tuple(cpool);
                     return std::make_tuple(cpool);
@@ -684,14 +684,14 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> {
             return proxy_iterator{
             return proxy_iterator{
                 std::get<0>(pools)->sparse_set<Entity>::end() - *length,
                 std::get<0>(pools)->sparse_set<Entity>::end() - *length,
                 std::tuple_cat([length = *length](auto *cpool) {
                 std::tuple_cat([length = *length](auto *cpool) {
-                    if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                    if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                         return std::make_tuple();
                         return std::make_tuple();
                     } else {
                     } else {
                         return std::make_tuple(cpool->end() - length);
                         return std::make_tuple(cpool->end() - length);
                     }
                     }
                 }(std::get<pool_type<Owned> *>(pools))...),
                 }(std::get<pool_type<Owned> *>(pools))...),
                 std::tuple_cat([](auto *cpool) {
                 std::tuple_cat([](auto *cpool) {
-                    if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                    if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                         return std::make_tuple();
                         return std::make_tuple();
                     } else {
                     } else {
                         return std::make_tuple(cpool);
                         return std::make_tuple(cpool);
@@ -704,14 +704,14 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> {
             return proxy_iterator{
             return proxy_iterator{
                 std::get<0>(pools)->sparse_set<Entity>::end(),
                 std::get<0>(pools)->sparse_set<Entity>::end(),
                 std::tuple_cat([](auto *cpool) {
                 std::tuple_cat([](auto *cpool) {
-                    if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                    if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                         return std::make_tuple();
                         return std::make_tuple();
                     } else {
                     } else {
                         return std::make_tuple(cpool->end());
                         return std::make_tuple(cpool->end());
                     }
                     }
                 }(std::get<pool_type<Owned> *>(pools))...),
                 }(std::get<pool_type<Owned> *>(pools))...),
                 std::tuple_cat([](auto *cpool) {
                 std::tuple_cat([](auto *cpool) {
-                    if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                    if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                         return std::make_tuple();
                         return std::make_tuple();
                     } else {
                     } else {
                         return std::make_tuple(cpool);
                         return std::make_tuple(cpool);

+ 2 - 2
src/entt/entity/view.hpp

@@ -213,7 +213,7 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
 
 
         [[nodiscard]] iterator begin() const ENTT_NOEXCEPT {
         [[nodiscard]] iterator begin() const ENTT_NOEXCEPT {
             return proxy_iterator{first, std::tuple_cat([](auto *cpool) {
             return proxy_iterator{first, std::tuple_cat([](auto *cpool) {
-                if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                     return std::make_tuple();
                     return std::make_tuple();
                 } else {
                 } else {
                     return std::make_tuple(cpool);
                     return std::make_tuple(cpool);
@@ -223,7 +223,7 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
 
 
         [[nodiscard]] iterator end() const ENTT_NOEXCEPT {
         [[nodiscard]] iterator end() const ENTT_NOEXCEPT {
             return proxy_iterator{last, std::tuple_cat([](auto *cpool) {
             return proxy_iterator{last, std::tuple_cat([](auto *cpool) {
-                if constexpr(is_eto_eligible_v<typename std::decay_t<decltype(*cpool)>::object_type>) {
+                if constexpr(is_eto_eligible_v<typename std::remove_reference_t<decltype(*cpool)>::object_type>) {
                     return std::make_tuple();
                     return std::make_tuple();
                 } else {
                 } else {
                     return std::make_tuple(cpool);
                     return std::make_tuple(cpool);