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:
Brues
2026-05-16 22:05:07 -05:00
parent 90a580d75d
commit 60147989bb
11 changed files with 46 additions and 99 deletions
+2 -2
View File
@@ -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) {