Преглед изворни кода

meta: no need to check the instance in the dtor wrapper

Michele Caini пре 5 година
родитељ
комит
62e12ee0aa
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      src/entt/meta/factory.hpp

+ 1 - 3
src/entt/meta/factory.hpp

@@ -395,9 +395,7 @@ struct meta_factory<Type> {
         auto * const type = internal::meta_info<Type>::resolve();
 
         type->dtor = [](void *instance) {
-            if(instance) {
-                std::invoke(Func, *static_cast<Type *>(instance));
-            }
+            std::invoke(Func, *static_cast<Type *>(instance));
         };
 
         return meta_factory<Type>{};