From 56ab608044a6161118e96ea7d2c048306fad9c5e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Sep 2018 14:32:25 -0400 Subject: core/core: Remove unnecessary sm/controller include The only reason this include was necessary, was because the constructor wasn't defaulted in the cpp file and the compiler would inline it wherever it was used. However, given Controller is forward declared, all those inlined constructors would see an incomplete type, causing a compilation failure. So, we just place the constructor in the cpp file, where it can see the complete type definition, allowing us to remove this include. --- src/core/core.cpp | 1 - src/core/hle/service/sm/controller.cpp | 2 ++ src/core/hle/service/sm/controller.h | 2 +- src/core/hle/service/sm/sm.cpp | 1 + src/core/hle/service/sm/sm.h | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/core.cpp b/src/core/core.cpp index cbab80881..bf39ad689 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -24,7 +24,6 @@ #include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/thread.h" #include "core/hle/service/service.h" -#include "core/hle/service/sm/controller.h" #include "core/hle/service/sm/sm.h" #include "core/loader/loader.h" #include "core/perf_stats.h" diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index 1cef73216..cdf328a26 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -57,4 +57,6 @@ Controller::Controller() : ServiceFramework("IpcController") { RegisterHandlers(functions); } +Controller::~Controller() = default; + } // namespace Service::SM diff --git a/src/core/hle/service/sm/controller.h b/src/core/hle/service/sm/controller.h index a4de52cd2..dc66c9e37 100644 --- a/src/core/hle/service/sm/controller.h +++ b/src/core/hle/service/sm/controller.h @@ -11,7 +11,7 @@ namespace Service::SM { class Controller final : public ServiceFramework { public: Controller(); - ~Controller() = default; + ~Controller() override; private: void ConvertSessionToDomain(Kernel::HLERequestContext& ctx); diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index b240d7eed..18d1641b8 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -15,6 +15,7 @@ namespace Service::SM { +ServiceManager::ServiceManager() = default; ServiceManager::~ServiceManager() = default; void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) { diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index e8ea62f08..a58d922a0 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -46,6 +46,7 @@ class ServiceManager { public: static void InstallInterfaces(std::shared_ptr self); + ServiceManager(); ~ServiceManager(); ResultVal> RegisterService(std::string name, -- cgit v1.2.3