diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2020-08-03 13:46:14 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2020-08-03 13:46:14 +0200 |
commit | 6a0b77996b426e35a3728f73bf48cfe08e8e3d24 (patch) | |
tree | a38c4fba7d03504b5b794bc93d81ecd624cee727 | |
parent | ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465) (diff) | |
download | yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar.gz yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar.bz2 yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar.lz yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar.xz yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.tar.zst yuzu-6a0b77996b426e35a3728f73bf48cfe08e8e3d24.zip |
-rw-r--r-- | src/core/hle/service/sm/sm.h | 5 |
1 files changed, 2 insertions, 3 deletions
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 <type_traits> #include <unordered_map> +#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<std::shared_ptr<Kernel::ClientPort>> GetServicePort(const std::string& name); ResultVal<std::shared_ptr<Kernel::ClientSession>> ConnectToService(const std::string& name); - template <typename T> + template <Common::IsBaseOf<Kernel::SessionRequestHandler> T> std::shared_ptr<T> GetService(const std::string& service_name) const { - static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, - "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); |