diff --git a/src/common/Parameter.cpp b/src/common/Parameter.cpp index b88dbfb4f1e..bcf5620ced1 100644 --- a/src/common/Parameter.cpp +++ b/src/common/Parameter.cpp @@ -4680,7 +4680,7 @@ bool Parameter::set_value_from_string_onto(const std::string &s, pdata &ontoThis } case ct_pbdepth: { - if (extend_range && s.find("/") != std::string::npos) + if (extend_range && s.find('/') != std::string::npos) { if (!supports_tuning_value_from_string(s, errMsg)) return false; @@ -4813,7 +4813,7 @@ bool Parameter::set_value_from_string_onto(const std::string &s, pdata &ontoThis if (displayInfo.customFeatures & ParamDisplayFeatures::kAllowsTuningFractionTypein) { // Check for a fraction - if (s.find("/") != std::string::npos) + if (s.find('/') != std::string::npos) { if (!supports_tuning_value_from_string(s, errMsg)) return false; @@ -5016,7 +5016,7 @@ bool Parameter::set_value_from_string_onto(const std::string &s, pdata &ontoThis // OK so do we contain a /? const char *slp; - if ((slp = strstr(strip, "/")) != nullptr) + if ((slp = strchr(strip, '/')) != nullptr) { float num = std::atof(strip); float den = std::atof(slp + 1); @@ -5120,7 +5120,7 @@ float Parameter::calculate_modulation_value_from_string(const std::string &s, st if (displayInfo.customFeatures & ParamDisplayFeatures::kAllowsTuningFractionTypein) { // Check for a fraction - if (s.find("/") != std::string::npos) + if (s.find('/') != std::string::npos) { if (!supports_tuning_value_from_string(s, errMsg)) return false; @@ -5435,7 +5435,7 @@ float Parameter::calculate_modulation_value_from_string(const std::string &s, st // OK so do we contain a /? const char *slp; - if ((slp = strstr(strip, "/")) != nullptr) + if ((slp = strchr(strip, '/')) != nullptr) { float num = std::atof(strip); float den = std::atof(slp + 1); diff --git a/src/surge-xt/gui/widgets/LFOAndStepDisplay.cpp b/src/surge-xt/gui/widgets/LFOAndStepDisplay.cpp index aa3ef7bb17e..021eebb3812 100644 --- a/src/surge-xt/gui/widgets/LFOAndStepDisplay.cpp +++ b/src/surge-xt/gui/widgets/LFOAndStepDisplay.cpp @@ -1335,12 +1335,10 @@ void LFOAndStepDisplay::paintStepSeq(juce::Graphics &g) auto q = boxo; - auto tf = juce::AffineTransform() + const auto tfpath = juce::AffineTransform() .scaled(boxo.getWidth() / valScale, boxo.getHeight() / valScale) .translated(q.getTopLeft().x, q.getTopLeft().y); - auto tfpath = tf; - g.setColour(skin->getColor(Colors::LFO::StepSeq::Envelope)); g.strokePath(eupath, juce::PathStrokeType(1.0), tfpath); @@ -2609,7 +2607,7 @@ void LFOAndStepDisplay::showStepTypein(int i) } auto handleTypein = [this, i](const std::string &s) { - auto divPos = s.find("/"); + auto divPos = s.find('/'); float v = 0.f; if (divPos != std::string::npos) diff --git a/src/surge-xt/gui/widgets/PatchSelector.cpp b/src/surge-xt/gui/widgets/PatchSelector.cpp index 17f97d21190..eb3a7933fe4 100644 --- a/src/surge-xt/gui/widgets/PatchSelector.cpp +++ b/src/surge-xt/gui/widgets/PatchSelector.cpp @@ -1210,11 +1210,11 @@ bool PatchSelector::populatePatchMenuForCategory(int c, juce::PopupMenu &context if (n_subc > 1) { - name = fmt::format("{} {}", menuName, subc + 1).c_str(); + name = fmt::format("{} {}", menuName, subc + 1); } else { - name = menuName.c_str(); + name = menuName; } if (!single_category)