From c24763e9b3ed2eaabef646ccbee7372ccee7f6fa Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 29 Sep 2023 19:32:58 +0200 Subject: [PATCH] recorrection, we only need ScopedSafeLocale for state handling Signed-off-by: falkTX --- distrho/src/DistrhoPluginCLAP.cpp | 5 ----- distrho/src/DistrhoPluginVST3.cpp | 15 ++------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp index 7ee7dc25..eafc05d9 100644 --- a/distrho/src/DistrhoPluginCLAP.cpp +++ b/distrho/src/DistrhoPluginCLAP.cpp @@ -1214,14 +1214,9 @@ public: } if (isInteger) - { *value = std::atoi(display); - } else - { - const ScopedSafeLocale ssl; *value = std::atof(display); - } return true; } diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp index 9dcbd58c..19ce5220 100644 --- a/distrho/src/DistrhoPluginVST3.cpp +++ b/distrho/src/DistrhoPluginVST3.cpp @@ -1842,18 +1842,12 @@ public: *output = static_cast(std::atoi(ScopedUTF8String(input))) / DPF_VST3_MAX_BUFFER_SIZE; return V3_OK; case kVst3InternalParameterSampleRate: - { - const ScopedSafeLocale ssl; - *output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_SAMPLE_RATE; - } + *output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_SAMPLE_RATE; return V3_OK; #endif #if DISTRHO_PLUGIN_WANT_LATENCY case kVst3InternalParameterLatency: - { - const ScopedSafeLocale ssl; - *output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_LATENCY; - } + *output = std::atof(ScopedUTF8String(input)) / DPF_VST3_MAX_LATENCY; return V3_OK; #endif #if DISTRHO_PLUGIN_WANT_PROGRAMS @@ -1898,14 +1892,9 @@ public: float value; if (fPlugin.getParameterHints(index) & kParameterIsInteger) - { value = std::atoi(input8); - } else - { - const ScopedSafeLocale ssl; value = std::atof(input8); - } *output = ranges.getNormalizedValue(value); return V3_OK;