diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2022-07-11 20:10:18 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-12 23:11:35 +0200 |
commit | c8585b77d263d15807231cb8bd1345d2591b9495 (patch) | |
tree | ac3c44a6f7d6fad59b942809d67b92826386b25c /Userland/Libraries/LibIMAP/Objects.cpp | |
parent | 3f3f45580ab7266258e97cb3cecf1e24716d61c5 (diff) | |
download | serenity-c8585b77d263d15807231cb8bd1345d2591b9495.zip |
Everywhere: Replace single-char StringView op. arguments with chars
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
Diffstat (limited to 'Userland/Libraries/LibIMAP/Objects.cpp')
-rw-r--r-- | Userland/Libraries/LibIMAP/Objects.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibIMAP/Objects.cpp b/Userland/Libraries/LibIMAP/Objects.cpp index a076756290..406e7ecc1d 100644 --- a/Userland/Libraries/LibIMAP/Objects.cpp +++ b/Userland/Libraries/LibIMAP/Objects.cpp @@ -36,11 +36,11 @@ String FetchCommand::DataItem::Section::serialize() const bool first = true; for (auto& field : headers.value()) { if (!first) - headers_builder.append(" "); + headers_builder.append(' '); headers_builder.append(field); first = false; } - headers_builder.append(")"); + headers_builder.append(')'); return headers_builder.build(); } case SectionType::Text: @@ -50,7 +50,7 @@ String FetchCommand::DataItem::Section::serialize() const bool first = true; for (int part : parts.value()) { if (!first) - sb.append("."); + sb.append('.'); sb.appendff("{}", part); first = false; } @@ -95,7 +95,7 @@ String FetchCommand::serialize() bool first = true; for (auto& sequence : sequence_set) { if (!first) { - sequence_builder.append(","); + sequence_builder.append(','); } sequence_builder.append(sequence.serialize()); first = false; @@ -105,7 +105,7 @@ String FetchCommand::serialize() first = true; for (auto& data_item : data_items) { if (!first) { - data_items_builder.append(" "); + data_items_builder.append(' '); } data_items_builder.append(data_item.serialize()); first = false; @@ -156,7 +156,7 @@ String SearchKey::serialize() const [&](Recent const&) { return String("RECENT"); }, [&](SearchKeys const& x) { StringBuilder sb; - sb.append("("); + sb.append('('); bool first = true; for (const auto& item : x.keys) { if (!first) |