diff options
author | Chris Robinson <[email protected]> | 2018-11-16 22:41:04 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-16 22:41:04 -0800 |
commit | 1bd40d94345ac263887b9a83c765ee46dc701799 (patch) | |
tree | 89cc2a21d1a16ade5b23d80ea068424c021411d0 /Alc | |
parent | de8d8b5216650467661040b6b47ea649cf898c01 (diff) |
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).
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 4ce66eaf..65023fe1 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -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();}) /************************************************ |