From 02bc9e9de14664f337da07f0efce750a0b6e993a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 5 Mar 2019 09:20:11 -0500 Subject: core/hle/ipc: Remove unnecessary includes Removes a few inclusion dependencies from the headers or replaces existing ones with ones that don't indirectly include the required headers. This allows removing an inclusion of core/memory.h, meaning that if the memory header is ever changed in the future, it won't result in rebuilding the entirety of the HLE services (as the IPC headers are used quite ubiquitously throughout the HLE service implementations). --- src/core/hle/kernel/hle_ipc.h | 10 +++++----- src/core/hle/kernel/svc.cpp | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel') diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index cb1c5aff3..0107acea4 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -15,6 +15,8 @@ #include "core/hle/ipc.h" #include "core/hle/kernel/object.h" +union ResultCode; + namespace Service { class ServiceFrameworkBase; } @@ -208,14 +210,12 @@ public: template SharedPtr GetCopyObject(std::size_t index) { - ASSERT(index < copy_objects.size()); - return DynamicObjectCast(copy_objects[index]); + return DynamicObjectCast(copy_objects.at(index)); } template SharedPtr GetMoveObject(std::size_t index) { - ASSERT(index < move_objects.size()); - return DynamicObjectCast(move_objects[index]); + return DynamicObjectCast(move_objects.at(index)); } void AddMoveObject(SharedPtr object) { @@ -232,7 +232,7 @@ public: template std::shared_ptr GetDomainRequestHandler(std::size_t index) const { - return std::static_pointer_cast(domain_request_handlers[index]); + return std::static_pointer_cast(domain_request_handlers.at(index)); } void SetDomainRequestHandlers( diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c5d399bab..5709134d5 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -20,6 +20,7 @@ #include "core/hle/kernel/address_arbiter.h" #include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" +#include "core/hle/kernel/errors.h" #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/mutex.h" -- cgit v1.2.3