summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-06-18 20:26:03 +1000
committerMaxime Coste <mawww@kakoune.org>2023-06-20 19:32:06 +1000
commite365c42b4be5c342c9fe97500a7232e43cc9ae25 (patch)
tree143d1373d9fb1adda57bf96659e16e89b29d93be /src
parentd43268fbebab0989015639c4bdc9e31aa137b06a (diff)
Small structured binding conversion
Diffstat (limited to 'src')
-rw-r--r--src/main.cc14
1 files 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<StringView>('\n'))
+ for (auto&& line : notes | split<StringView>('\n'))
info.push_back(parse_display_line(line, GlobalScope::instance().faces()));
}
if (not info.empty())