From e365c42b4be5c342c9fe97500a7232e43cc9ae25 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 18 Jun 2023 20:26:03 +1000 Subject: [PATCH] Small structured binding conversion --- src/main.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cc b/src/main.cc index ac4a5625..60bca904 100644 --- a/src/main.cc +++ b/src/main.cc @@ -145,24 +145,24 @@ void show_startup_info(Client* local_client, int last_version) { const Face version_face{Color::Default, Color::Default, Attribute::Bold}; DisplayLineList info; - for (auto note : version_notes) + for (auto [version, notes] : version_notes) { - if (note.version and note.version <= last_version) + if (version and version <= last_version) continue; - if (not note.version) + if (not version) info.push_back({"• Development version", version_face}); else { - const auto year = note.version / 10000; - const auto month = (note.version / 100) % 100; - const auto day = note.version % 100; + const auto year = version / 10000; + const auto month = (version / 100) % 100; + const auto day = version % 100; info.push_back({format("• Kakoune v{}.{}{}.{}{}", year, month < 10 ? "0" : "", month, day < 10 ? "0" : "", day), version_face}); } - for (auto&& line : note.notes | split('\n')) + for (auto&& line : notes | split('\n')) info.push_back(parse_display_line(line, GlobalScope::instance().faces())); } if (not info.empty())