diff --git a/stratosphere/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp b/stratosphere/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp index fcf827375..ea97ec657 100644 --- a/stratosphere/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp +++ b/stratosphere/libstratosphere/source/sf/hipc/sf_hipc_server_domain_session_manager.cpp @@ -80,18 +80,14 @@ namespace ams::sf::hipc { /* Create new object. */ cmif::MitmDomainServiceObject *domain_ptr = static_cast(domain); - new_holder = cmif::ServiceObjectHolder(std::move(std::shared_ptr(domain_ptr, [](cmif::MitmDomainServiceObject *obj) { - cmif::ServerDomainManager::DestroyDomainServiceObject(static_cast(obj)); - }))); + new_holder = cmif::ServiceObjectHolder(std::move(std::shared_ptr(domain_ptr, cmif::ServerDomainManager::DestroyDomainServiceObject))); } else { /* We're not a mitm session. Reserve a new object in the domain. */ R_TRY(domain->ReserveIds(&object_id, 1)); /* Create new object. */ cmif::DomainServiceObject *domain_ptr = static_cast(domain); - new_holder = cmif::ServiceObjectHolder(std::move(std::shared_ptr(domain_ptr, [](cmif::DomainServiceObject *obj) { - cmif::ServerDomainManager::DestroyDomainServiceObject(static_cast(obj)); - }))); + new_holder = cmif::ServiceObjectHolder(std::move(std::shared_ptr(domain_ptr, cmif::ServerDomainManager::DestroyDomainServiceObject))); } AMS_ASSERT(object_id != cmif::InvalidDomainObjectId);