diff --git a/src/core/hle/kernel/server_port.h b/src/core/hle/kernel/server_port.h index 9413d8ab7..6d458b188 100644 --- a/src/core/hle/kernel/server_port.h +++ b/src/core/hle/kernel/server_port.h @@ -10,6 +10,7 @@ #include "common/common_types.h" #include "core/hle/kernel/object.h" #include "core/hle/kernel/wait_object.h" +#include "core/hle/result.h" namespace Kernel { diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index dd3a05275..9e9164a66 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -47,7 +47,7 @@ public: ResultVal> ConnectToService(const std::string& name); template - std::shared_ptr GetService(const std::string& service_name) { + 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); @@ -59,7 +59,7 @@ public: if (port == nullptr) { return nullptr; } - return std::dynamic_pointer_cast(port->hle_handler); + return std::static_pointer_cast(port->hle_handler); } private: