1
0
Эх сурвалжийг харах

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

Michele Caini 5 жил өмнө
parent
commit
62e12ee0aa

+ 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>{};