浏览代码

let's see if vs solved its problems with aliases

Michele Caini 7 年之前
父节点
当前提交
0be2f1b295
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      src/entt/entity/group.hpp
  2. 1 1
      src/entt/entity/view.hpp

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

@@ -88,7 +88,7 @@ class basic_group<Entity, get_t<Get...>> {
     using pool_type = std::conditional_t<std::is_const_v<Component>, const sparse_set<Entity, std::remove_const_t<Component>>, sparse_set<Entity, Component>>;
     using pool_type = std::conditional_t<std::is_const_v<Component>, const sparse_set<Entity, std::remove_const_t<Component>>, sparse_set<Entity, Component>>;
 
 
     // we could use pool_type<Get> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
     // we could use pool_type<Get> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    basic_group(sparse_set<Entity> *ref, sparse_set<Entity, std::remove_const_t<Get>> *... get) ENTT_NOEXCEPT
+    basic_group(sparse_set<Entity> *ref, pool_type<Get> *... get) ENTT_NOEXCEPT
         : handler{ref},
         : handler{ref},
           pools{get...}
           pools{get...}
     {}
     {}
@@ -418,7 +418,7 @@ class basic_group<Entity, get_t<Get...>, Owned...> {
     using component_iterator_type = decltype(std::declval<pool_type<Component>>().begin());
     using component_iterator_type = decltype(std::declval<pool_type<Component>>().begin());
 
 
     // we could use pool_type<Type> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
     // we could use pool_type<Type> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    basic_group(const typename basic_registry<Entity>::size_type *sz, sparse_set<Entity, std::remove_const_t<Owned>> *... owned, sparse_set<Entity, std::remove_const_t<Get>> *... get) ENTT_NOEXCEPT
+    basic_group(const typename basic_registry<Entity>::size_type *sz, pool_type<Owned> *... owned, pool_type<Get> *... get) ENTT_NOEXCEPT
         : length{sz},
         : length{sz},
           pools{owned..., get...}
           pools{owned..., get...}
     {}
     {}

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

@@ -142,7 +142,7 @@ class basic_view {
     };
     };
 
 
     // we could use pool_type<Component> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
     // we could use pool_type<Component> *..., but vs complains about it and refuses to compile for unknown reasons (likely a bug)
-    basic_view(sparse_set<Entity, std::remove_const_t<Component>> *... ref) ENTT_NOEXCEPT
+    basic_view(pool_type<Component> *... ref) ENTT_NOEXCEPT
         : pools{ref...}
         : pools{ref...}
     {}
     {}