From 293b0253c496dd6d27932c06265b9616ba7bc902 Mon Sep 17 00:00:00 2001 From: kristjanmoore Date: Sun, 23 Aug 2020 17:35:45 +0000 Subject: [PATCH] Set min_waterfall special cases outside loop --- plugins/embark-assistant/finder_ui.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/plugins/embark-assistant/finder_ui.cpp b/plugins/embark-assistant/finder_ui.cpp index a553144b8..aaaf8945e 100644 --- a/plugins/embark-assistant/finder_ui.cpp +++ b/plugins/embark-assistant/finder_ui.cpp @@ -535,19 +535,16 @@ namespace embark_assist { break; case fields::min_waterfall: - for (int16_t k = -1; k <= 9; k++) { - if (k == -1) { - element->list.push_back({ "N/A", k }); - } - else if (k == 0) { - element->list.push_back({ "Absent", k }); - } - else { - element->list.push_back({ std::to_string(k), k }); - } + + element->list.push_back({ "N/A", -1 }); + element->list.push_back({ "Absent", 0 }); + + for (int16_t k = 1; k <= 9; k++) { + element->list.push_back({ std::to_string(k), k }); } + for (int16_t k = 10; k <= 50; k+=5) { - element->list.push_back({ std::to_string(k), k }); + element->list.push_back({ std::to_string(k), k }); } break;