From 9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 May 2021 01:46:30 -0400 Subject: core: Make variable shadowing a compile-time error Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely. --- src/core/hle/service/service.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/hle/service/service.h') diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 3dfb0740a..4c048173b 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -155,17 +155,17 @@ protected: /** * Constructs a FunctionInfo for a function. * - * @param expected_header request header in the command buffer which will trigger dispatch + * @param expected_header_ request header in the command buffer which will trigger dispatch * to this handler - * @param handler_callback member function in this service which will be called to handle + * @param handler_callback_ member function in this service which will be called to handle * the request - * @param name human-friendly name for the request. Used mostly for logging purposes. + * @param name_ human-friendly name for the request. Used mostly for logging purposes. */ - FunctionInfo(u32 expected_header, HandlerFnP handler_callback, const char* name) + FunctionInfo(u32 expected_header_, HandlerFnP handler_callback_, const char* name_) : FunctionInfoBase{ - expected_header, + expected_header_, // Type-erase member function pointer by casting it down to the base class. - static_cast>(handler_callback), name} {} + static_cast>(handler_callback_), name_} {} }; /** -- cgit v1.2.3