diff options
author | bunnei <bunneidev@gmail.com> | 2020-08-03 20:11:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-03 20:11:22 +0200 |
commit | 94c1689ef3acac0001ae59db84029ee457ce7fdd (patch) | |
tree | 6b2561587ce4bdedddc29b6bc59803be91cc8bbc | |
parent | Merge pull request #4467 from lioncash/mode (diff) | |
parent | sm: Make use of IsBaseOf for GetService (diff) | |
download | yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar.gz yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar.bz2 yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar.lz yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar.xz yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.tar.zst yuzu-94c1689ef3acac0001ae59db84029ee457ce7fdd.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); |