mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 21:02:41 +00:00
Explain MSVC ICF workaround for spelltype commands
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
parent
6a8b4c746d
commit
c0f5af2bd7
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
||||||
{
|
{
|
||||||
// Keep this function body unique to avoid alias detection on Windows builds.
|
// Unique marker to prevent MSVC's Identical COMDAT Folding (/OPT:ICF)
|
||||||
|
// from merging this function with bot_command_spelltype_names, which
|
||||||
|
// would cause the alias detection in bot_command_add() to fail.
|
||||||
static volatile int spelltype_ids_marker = 0;
|
static volatile int spelltype_ids_marker = 0;
|
||||||
(void)spelltype_ids_marker;
|
(void)spelltype_ids_marker;
|
||||||
SendSpellTypeWindow(c, sep);
|
SendSpellTypeWindow(c, sep);
|
||||||
@ -10,7 +12,9 @@ void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
|||||||
|
|
||||||
void bot_command_spelltype_names(Client* c, const Seperator* sep)
|
void bot_command_spelltype_names(Client* c, const Seperator* sep)
|
||||||
{
|
{
|
||||||
// Keep this function body unique to avoid alias detection on Windows builds.
|
// Unique marker to prevent MSVC's Identical COMDAT Folding (/OPT:ICF)
|
||||||
|
// from merging this function with bot_command_spelltype_ids, which
|
||||||
|
// would cause the alias detection in bot_command_add() to fail.
|
||||||
static volatile int spelltype_names_marker = 0;
|
static volatile int spelltype_names_marker = 0;
|
||||||
(void)spelltype_names_marker;
|
(void)spelltype_names_marker;
|
||||||
SendSpellTypeWindow(c, sep);
|
SendSpellTypeWindow(c, sep);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user