diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-19 21:16:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-19 21:17:02 +0200 |
commit | 6d4016dd010cc09c06c70db5825ced6090334347 (patch) | |
tree | c957a6f8a6972c7d0affe4fc6b3fd13414b77ed9 /Libraries | |
parent | a188e6e7d6430e3b7668108338e23eb5546659ae (diff) | |
download | serenity-6d4016dd010cc09c06c70db5825ced6090334347.zip |
LibGUI: Use StringBuilder::join() in Shortcut::to_string()
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/Shortcut.cpp | 6 |
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(); } |