mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 04:38:32 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/6e7459322d Pull-request: https://github.com/SerenityOS/serenity/pull/17192 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/nico ✅
@@ -32,8 +32,8 @@ void SemanticSyntaxHighlighter::rehighlight(Palette const& palette)
|
||||
for (Cpp::Token const& token : m_saved_tokens)
|
||||
previous_tokens_as_lines.appendff("{}\n", token.type_as_deprecated_string());
|
||||
|
||||
auto previous = previous_tokens_as_lines.build();
|
||||
auto current = current_tokens_as_lines.build();
|
||||
auto previous = previous_tokens_as_lines.to_deprecated_string();
|
||||
auto current = current_tokens_as_lines.to_deprecated_string();
|
||||
|
||||
// FIXME: Computing the diff on the entire document's tokens is quite inefficient.
|
||||
// An improvement over this could be only including the tokens that are in edited text ranges in the diff.
|
||||
|
||||
Reference in New Issue
Block a user