Skip to content

Commit

Permalink
clean up syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkRTA committed Apr 30, 2024
1 parent 53f330f commit f32149b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ports-juce6.0/vitalium/source/common/synth_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ void SynthBase::loadTuningFile(const File& file) {
void SynthBase::loadInitPreset() {
pauseProcessing(true);

auto old_values = std::map<std::string, float>();
for (auto i = controls_.begin(); i != controls_.end(); i++) {
old_values.insert(std::pair<std::string, float>(i->first, i->second->value()));
std::map<std::string, float> old_values;
for (const auto &i: controls_) {
old_values.insert(std::pair<std::string, float>(i.first, i.second->value()));
}

engine_->allSoundsOff();
Expand All @@ -362,9 +362,9 @@ void SynthBase::loadInitPreset() {
bool SynthBase::loadFromJson(const json& data) {
pauseProcessing(true);

auto old_values = std::map<std::string, float>();
for (auto i = controls_.begin(); i != controls_.end(); i++) {
old_values.insert(std::pair<std::string, float>(i->first, i->second->value()));
std::map<std::string, float> old_values;
for (const auto &i: controls_) {
old_values.insert(std::pair<std::string, float>(i.first, i.second->value()));
}

engine_->allSoundsOff();
Expand Down

0 comments on commit f32149b

Please sign in to comment.