review adjuster class: reduce memory allocations/deallocations, also small speedup for adjuster creation

This commit is contained in:
heckflosse
2019-05-13 15:15:37 +02:00
parent a2e2ace1c8
commit de3d667ed7
4 changed files with 151 additions and 189 deletions

View File

@@ -290,7 +290,7 @@ Wavelet::Wavelet() :
ss = Glib::ustring::compose( "%1", (i + 1));
}
correction[i] = Gtk::manage ( new Adjuster (ss, -100, 350, 1, 0) );
correction[i] = Gtk::manage(new Adjuster(std::move(ss), -100, 350, 1, 0));
correction[i]->setAdjusterListener(this);
levBox->pack_start(*correction[i]);
}
@@ -398,7 +398,7 @@ Wavelet::Wavelet() :
ss = Glib::ustring::compose( "%1", (i + 1));
}
correctionch[i] = Gtk::manage ( new Adjuster (ss, -100, 100, 1, 0) );
correctionch[i] = Gtk::manage(new Adjuster(std::move(ss), -100, 100, 1, 0));
correctionch[i]->setAdjusterListener(this);
chBox->pack_start(*correctionch[i]);
}