From 64b7f7e5b1def53b5179d1c2aaf63300d56f7b7a Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sun, 25 Jan 2026 00:49:54 +0000 Subject: [PATCH] Revert "core: Temporary workaround for MSVC compiler bug (#1505)" This reverts commit b0fe4d190d56c97d1f3b0e71a54f91b5744ae82d. --- src/core/hle/service/service.cpp | 2 +- src/core/hle/service/service.h | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 6ead40057..148d60185 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -178,7 +178,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct void ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) { auto itr = handlers.find(context.CommandHeader().command_id.Value()); const FunctionInfoBase* info = itr == handlers.end() ? nullptr : &itr->second; - if (info == nullptr || !info->implemented) { + if (info == nullptr || info->handler_callback == nullptr) { context.ReportUnimplemented(); return ReportUnimplementedFunction(context.CommandBuffer(), info); } diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 3dddf39d4..fbe368c2c 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -82,7 +82,6 @@ private: struct FunctionInfoBase { u32 command_id; - bool implemented; HandlerFnP handler_callback; const char* name; }; @@ -97,8 +96,6 @@ private: void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n); void ReportUnimplementedFunction(u32* cmd_buf, const FunctionInfoBase* info); - void Empty(Kernel::HLERequestContext& ctx) {} - /// Identifier string used to connect to the service. std::string service_name; /// Maximum number of concurrent sessions that this service can handle. @@ -137,11 +134,9 @@ protected: */ constexpr FunctionInfo(u32 command_id, HandlerFnP handler_callback, const char* name) : FunctionInfoBase{ - command_id, handler_callback != nullptr, + command_id, // Type-erase member function pointer by casting it down to the base class. - handler_callback ? static_cast>(handler_callback) - : &ServiceFrameworkBase::Empty, - name} {} + static_cast>(handler_callback), name} {} }; /**