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

This commit is contained in:
Michele Caini
2021-03-09 10:34:06 +01:00
parent 80e73c1089
commit 62e12ee0aa

View File

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