Refactor freqman_db parsing (#1244)

* WIP freqman changes/memory perf/stash
* Split ui tone_key function out for testing.
* Add more tests and fix bugs.
* Use default max_entries in recond
* Set limit back to 90 for now
This commit is contained in:
Kyle Reed 2023-07-08 13:04:12 -07:00 committed by GitHub
parent 60de625c37
commit 497ca3f934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1206 additions and 705 deletions

View file

@ -1390,12 +1390,12 @@ void ImageToggle::set_value(bool b) {
/* ImageOptionsField *****************************************************/
ImageOptionsField::ImageOptionsField(
const Rect parent_rect,
const Color foreground,
const Color background,
const options_t options)
Rect parent_rect,
Color foreground,
Color background,
options_t options)
: Widget{parent_rect},
options{options},
options{std::move(options)},
foreground_{foreground},
background_{background} {
set_focusable(true);
@ -1437,7 +1437,7 @@ void ImageOptionsField::set_by_value(value_t v) {
}
void ImageOptionsField::set_options(options_t new_options) {
options = new_options;
options = std::move(new_options);
// Set an invalid index to force on_change.
selected_index_ = (size_t)-1;
@ -1486,7 +1486,7 @@ OptionsField::OptionsField(
options_t options)
: Widget{{parent_pos, {8 * length, 16}}},
length_{length},
options{options} {
options{std::move(options)} {
set_focusable(true);
}
@ -1543,7 +1543,7 @@ void OptionsField::set_by_nearest_value(value_t v) {
}
void OptionsField::set_options(options_t new_options) {
options = new_options;
options = std::move(new_options);
// Set an invalid index to force on_change.
selected_index_ = (size_t)-1;