From 0e7d078b01e423e7973cc593046f9716d1ca8c0b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 1 May 2023 01:38:16 -0700 Subject: Avoid assigning to existing optional Reduces the amount inlining the compiler has to do, though the uhj/filter config option is no longer recognized (it has been deprecated, amd I don't think it was in an actual release). --- alc/alc.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'alc/alc.cpp') diff --git a/alc/alc.cpp b/alc/alc.cpp index 504737ec..63654b1a 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1201,13 +1201,7 @@ void alc_initconfig(void) } Voice::InitMixer(ConfigValueStr(nullptr, nullptr, "resampler")); - auto uhjfiltopt = ConfigValueStr(nullptr, "uhj", "decode-filter"); - if(!uhjfiltopt) - { - if((uhjfiltopt = ConfigValueStr(nullptr, "uhj", "filter"))) - WARN("uhj/filter is deprecated, please use uhj/decode-filter\n"); - } - if(uhjfiltopt) + if(auto uhjfiltopt = ConfigValueStr(nullptr, "uhj", "decode-filter")) { if(al::strcasecmp(uhjfiltopt->c_str(), "fir256") == 0) UhjDecodeQuality = UhjQualityType::FIR256; @@ -1218,7 +1212,7 @@ void alc_initconfig(void) else WARN("Unsupported uhj/decode-filter: %s\n", uhjfiltopt->c_str()); } - if((uhjfiltopt = ConfigValueStr(nullptr, "uhj", "encode-filter"))) + if(auto uhjfiltopt = ConfigValueStr(nullptr, "uhj", "encode-filter")) { if(al::strcasecmp(uhjfiltopt->c_str(), "fir256") == 0) UhjEncodeQuality = UhjQualityType::FIR256; -- cgit v1.2.3