diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 5d3965ebc6..a6e2d4b8cc 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -47,9 +47,9 @@ ServiceFrameworkBase::~ServiceFrameworkBase() { const auto guard = ServiceFrameworkBase::LockService(); } -void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, std::optional info) { +void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info) { auto cmd_buf = ctx.CommandBuffer(); - std::string function_name = info.has_value() ? info->name : ""; + std::string function_name = bool(info) ? info->name : ""; fmt::memory_buffer buf; fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#x}", ctx.GetCommand(), function_name, service_name, cmd_buf[0]); @@ -70,7 +70,7 @@ void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) { const bool is_cmd_read = ctx.GetCommand() == 0; auto const info = FindRequest(ctx.GetCommand()); if (!info.has_value() || info->handler_callback == nullptr) - return ReportUnimplementedFunction(ctx, info); + return ReportUnimplementedFunction(ctx, &*info); LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer())); handler_invoker(this, info->handler_callback, ctx); @@ -85,7 +85,7 @@ void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) { void ServiceFrameworkBase::InvokeRequestTipc(HLERequestContext& ctx) { auto const info = FindRequestTipc(ctx.GetCommand()); if (!info.has_value() || info->handler_callback == nullptr) - return ReportUnimplementedFunction(ctx, info); + return ReportUnimplementedFunction(ctx, &*info); LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer())); handler_invoker(this, info->handler_callback, ctx); diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 9a2ee549cb..76870338c5 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -160,7 +160,7 @@ protected: using FunctionInfo = FunctionInfoTyped; template - requires (std::same_as && ...) + //requires (std::same_as && ...) [[nodiscard]] static consteval frozen::map, sizeof...(Ts)> CreateStaticMap(Ts... args) { return frozen::map, sizeof...(args)>{ {args.expected_header, HandlerFnP(args.handler_callback)}... @@ -169,7 +169,7 @@ protected: // Used exclusively by NFC template - requires (std::same_as> && ...) + //requires (std::same_as> && ...) [[nodiscard]] static consteval frozen::map, sizeof...(Ts)> CreateStaticMapWithClass(Ts... args) { return frozen::map, sizeof...(args)>{ {args.expected_header, HandlerFnP(args.handler_callback)}...