Put a lambda in the call_once call

This optimizes better and avoids a visible symbol (templating to an anonymous
lambda type will generate a unique anonymous instantiation, making inlining
more likely, whereas passing a general function pointer/reference type will
likely use or generate a publically available instance).
This commit is contained in:
Chris Robinson 2018-11-16 22:41:04 -08:00
parent de8d8b5216
commit 1bd40d9434

View File

@ -1211,7 +1211,7 @@ static void alc_initconfig(void)
if((str && str[0]) || ConfigValueStr(nullptr, nullptr, "default-reverb", &str))
LoadReverbPreset(str, &DefaultEffect);
}
#define DO_INITCONFIG() std::call_once(alc_config_once, alc_initconfig)
#define DO_INITCONFIG() std::call_once(alc_config_once, [](){alc_initconfig();})
/************************************************