mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-02 22:51:46 +00:00
View::add_children: Use std::list_initializer as argument.
Improvement in code size -- 944 bytes. Some day I will understand C++11 well enough to do the right thing the first time.
This commit is contained in:
@@ -44,10 +44,10 @@ AMOptionsView::AMOptionsView(
|
||||
{
|
||||
set_style(style);
|
||||
|
||||
add_children({ {
|
||||
add_children({
|
||||
&label_config,
|
||||
&options_config,
|
||||
} });
|
||||
});
|
||||
|
||||
options_config.set_selected_index(receiver_model.am_configuration());
|
||||
options_config.on_change = [this](size_t n, OptionsField::value_t) {
|
||||
@@ -63,10 +63,10 @@ NBFMOptionsView::NBFMOptionsView(
|
||||
{
|
||||
set_style(style);
|
||||
|
||||
add_children({ {
|
||||
add_children({
|
||||
&label_config,
|
||||
&options_config,
|
||||
} });
|
||||
});
|
||||
|
||||
options_config.set_selected_index(receiver_model.nbfm_configuration());
|
||||
options_config.on_change = [this](size_t n, OptionsField::value_t) {
|
||||
@@ -79,7 +79,7 @@ NBFMOptionsView::NBFMOptionsView(
|
||||
AnalogAudioView::AnalogAudioView(
|
||||
NavigationView& nav
|
||||
) {
|
||||
add_children({ {
|
||||
add_children({
|
||||
&rssi,
|
||||
&channel,
|
||||
&audio,
|
||||
@@ -90,7 +90,7 @@ AnalogAudioView::AnalogAudioView(
|
||||
&field_volume,
|
||||
&record_view,
|
||||
&waterfall,
|
||||
} });
|
||||
});
|
||||
|
||||
field_frequency.set_value(receiver_model.tuning_frequency());
|
||||
field_frequency.set_step(receiver_model.frequency_step());
|
||||
|
||||
Reference in New Issue
Block a user