mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Collapse Event::Custom::Fire_* into one variadic template
The six per-arity helpers (Fire_None / Fire_D / Fire_DD / Fire_DDD / Fire_SD / Fire_S) all wrapped the same FUN_FIRE_EVENT engine call with the same eventID<0 early-out — only the format string and arg list differed. Collapsing into a single template Fire(eventID, fmt, args...) keeps the printf-style format at the call site and frees us from adding a new per-arity overload for each new event shape.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// This file is part of ClassicAPI.
|
||||
// This file is part of ClassicAPI.
|
||||
//
|
||||
// ClassicAPI is free software: you can redistribute it and/or modify it under the terms
|
||||
// of the GNU Lesser General Public License as published by the Free Software Foundation, either
|
||||
@@ -147,7 +147,7 @@ void ProcessKeyMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||
// and the index may shift.
|
||||
const int slot = Event::Custom::Lookup(kModifierStateChanged);
|
||||
if (slot >= 0)
|
||||
Event::Custom::Fire_SD(slot, kKeyName[bitIdx], static_cast<int>(nowDown));
|
||||
Event::Custom::Fire(slot, "%s%d", kKeyName[bitIdx], static_cast<int>(nowDown));
|
||||
}
|
||||
|
||||
LRESULT CALLBACK GetMsgHook(int code, WPARAM wParam, LPARAM lParam) {
|
||||
|
||||
Reference in New Issue
Block a user