diff options
author | Chris Robinson <[email protected]> | 2019-06-30 16:15:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-30 16:40:08 -0700 |
commit | 3658dafdcbbd114caaf81cb27cf6ccc07045b0aa (patch) | |
tree | 01065f3aeb473a8b65aee6032e718cbe1e62eb9f /Alc/mixvoice.cpp | |
parent | db026454f28f93fe7c38dc84a79813a59afeb1d0 (diff) |
Use an optional for ConfigValueStr
Diffstat (limited to 'Alc/mixvoice.cpp')
-rw-r--r-- | Alc/mixvoice.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp index 9408d096..9b0196d9 100644 --- a/Alc/mixvoice.cpp +++ b/Alc/mixvoice.cpp @@ -155,10 +155,9 @@ ResamplerFunc SelectResampler(Resampler resampler) void aluInitMixer() { - const char *str; - - if(ConfigValueStr(nullptr, nullptr, "resampler", &str)) + if(auto resopt = ConfigValueStr(nullptr, nullptr, "resampler")) { + const char *str{resopt->c_str()}; if(strcasecmp(str, "point") == 0 || strcasecmp(str, "none") == 0) ResamplerDefault = PointResampler; else if(strcasecmp(str, "linear") == 0) |