summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-19 21:16:22 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-19 21:17:02 +0200
commit6d4016dd010cc09c06c70db5825ced6090334347 (patch)
treec957a6f8a6972c7d0affe4fc6b3fd13414b77ed9 /Libraries
parenta188e6e7d6430e3b7668108338e23eb5546659ae (diff)
downloadserenity-6d4016dd010cc09c06c70db5825ced6090334347.zip
LibGUI: Use StringBuilder::join() in Shortcut::to_string()
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/Shortcut.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Libraries/LibGUI/Shortcut.cpp b/Libraries/LibGUI/Shortcut.cpp
index 7793e255ab..5dfc3a5931 100644
--- a/Libraries/LibGUI/Shortcut.cpp
+++ b/Libraries/LibGUI/Shortcut.cpp
@@ -50,11 +50,7 @@ String Shortcut::to_string() const
parts.append("(Invalid)");
StringBuilder builder;
- for (size_t i = 0; i < parts.size(); ++i) {
- builder.append(parts[i]);
- if (i != parts.size() - 1)
- builder.append('+');
- }
+ builder.join('+', parts);
return builder.to_string();
}