summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibLine/Editor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2023-01-26 18:58:09 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-27 20:38:49 +0000
commit6e7459322d8336bfe52e390ab4a1b2e82e24c05e (patch)
tree6da4b3a89764a22a1c62eabfa5fc5ee954519c41 /Userland/Libraries/LibLine/Editor.cpp
parentda81041e97d0fc7d37a985ce6ca4ded19ce2cdd1 (diff)
downloadserenity-6e7459322d8336bfe52e390ab4a1b2e82e24c05e.zip
AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and keeping the more obvious name should flush out more uses of deprecated strings. No behavior change.
Diffstat (limited to 'Userland/Libraries/LibLine/Editor.cpp')
-rw-r--r--Userland/Libraries/LibLine/Editor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp
index c108f170de..4ee1726c6c 100644
--- a/Userland/Libraries/LibLine/Editor.cpp
+++ b/Userland/Libraries/LibLine/Editor.cpp
@@ -372,7 +372,7 @@ void Editor::insert(const u32 cp)
{
StringBuilder builder;
builder.append(Utf32View(&cp, 1));
- auto str = builder.build();
+ auto str = builder.to_deprecated_string();
if (m_pending_chars.try_append(str.characters(), str.length()).is_error())
return;
@@ -1750,7 +1750,7 @@ DeprecatedString Style::to_deprecated_string() const
builder.append('}');
- return builder.build();
+ return builder.to_deprecated_string();
}
ErrorOr<void> VT::apply_style(Style const& style, Core::Stream::Stream& stream, bool is_starting)
@@ -2182,7 +2182,7 @@ DeprecatedString Editor::line(size_t up_to_index) const
{
StringBuilder builder;
builder.append(Utf32View { m_buffer.data(), min(m_buffer.size(), up_to_index) });
- return builder.build();
+ return builder.to_deprecated_string();
}
void Editor::remove_at_index(size_t index)