removed some std stuff only used here (#2681)

This commit is contained in:
Totoo
2025-06-05 11:32:26 +02:00
committed by GitHub
parent 9e96715176
commit a980fe21ac

View File

@@ -102,8 +102,15 @@ void MorseView::on_set_tone(NavigationView& nav) {
tone_input_buffer = to_string_dec_uint(tone);
text_prompt(nav, tone_input_buffer, 4, ENTER_KEYBOARD_MODE_DIGITS, [this](std::string& buffer) {
if (!buffer.empty() && std::all_of(buffer.begin(), buffer.end(), ::isdigit)) {
int new_tone = std::stoi(buffer);
bool is_digit_only = true;
for (size_t i = 0; i < tone_input_buffer.size(); ++i) {
if (tone_input_buffer[i] < '0' || tone_input_buffer[i] > '9') {
is_digit_only = false;
break;
}
}
if (!buffer.empty() && is_digit_only) {
int new_tone = atoi(buffer.c_str());
if (new_tone >= 100 && new_tone <= 9999) {
tone = new_tone;
field_tone.set_value(tone);
@@ -116,7 +123,6 @@ void MorseView::on_set_tone(NavigationView& nav) {
}
});
}
void MorseView::on_set_text(NavigationView& nav) {
text_prompt(nav, buffer, 28, ENTER_KEYBOARD_MODE_ALPHA);
}