瀏覽代碼

registry: pass *this directly to sparse set bind function

Michele Caini 2 年之前
父節點
當前提交
893eb8fabb
共有 1 個文件被更改,包括 3 次插入 和 3 次删除
  1. 3 3
      src/entt/entity/registry.hpp

+ 3 - 3
src/entt/entity/registry.hpp

@@ -262,7 +262,7 @@ class basic_registry {
                 }
                 }
 
 
                 pools.emplace(id, cpool);
                 pools.emplace(id, cpool);
-                cpool->bind(forward_as_any(*this));
+                cpool->bind(*this);
 
 
                 return static_cast<storage_type &>(*cpool);
                 return static_cast<storage_type &>(*cpool);
             } else {
             } else {
@@ -290,10 +290,10 @@ class basic_registry {
     }
     }
 
 
     void rebind() {
     void rebind() {
-        entities.bind(forward_as_any(*this));
+        entities.bind(*this);
 
 
         for(auto &&curr: pools) {
         for(auto &&curr: pools) {
-            curr.second->bind(forward_as_any(*this));
+            curr.second->bind(*this);
         }
         }
     }
     }