mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 18:59:26 +02:00
[core] Fix MSVC handler table initialization (#4421)
Construct FunctionInfoTyped at runtime instead of forcing constant initialization. This avoids malformed static handler tables when MSVC converts typed member-function pointers, particularly for entries with null handlers. - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4421 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
2b4184dd2b
commit
5adaa5b0f7
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ protected:
|
||||||
/// @param expected_header_ request header in the command buffer which will trigger dispatch to this handler
|
/// @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 the request
|
/// @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.
|
||||||
constexpr FunctionInfoTyped(u32 expected_header_, HandlerFnP<T> handler_callback_, const char* name_)
|
FunctionInfoTyped(u32 expected_header_, HandlerFnP<T> handler_callback_, const char* name_)
|
||||||
: FunctionInfoBase{expected_header_, HandlerFnP<ServiceFrameworkBase>(handler_callback_), name_} {}
|
: FunctionInfoBase{expected_header_, HandlerFnP<ServiceFrameworkBase>(handler_callback_), name_} {}
|
||||||
};
|
};
|
||||||
using FunctionInfo = FunctionInfoTyped<Self>;
|
using FunctionInfo = FunctionInfoTyped<Self>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue