From 6a0b77996b426e35a3728f73bf48cfe08e8e3d24 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Mon, 3 Aug 2020 21:46:14 +1000 Subject: sm: Make use of IsBaseOf for GetService --- src/core/hle/service/sm/sm.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index b06d2f103..b526a94fe 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -9,6 +9,7 @@ #include #include +#include "common/concepts.h" #include "core/hle/kernel/client_port.h" #include "core/hle/kernel/object.h" #include "core/hle/kernel/server_port.h" @@ -56,10 +57,8 @@ public: ResultVal> GetServicePort(const std::string& name); ResultVal> ConnectToService(const std::string& name); - template + template T> std::shared_ptr GetService(const std::string& service_name) const { - static_assert(std::is_base_of_v, - "Not a base of ServiceFrameworkBase"); auto service = registered_services.find(service_name); if (service == registered_services.end()) { LOG_DEBUG(Service, "Can't find service: {}", service_name); -- cgit v1.2.3