1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00: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:
Linus Groh 2023-01-26 18:58:09 +00:00
parent da81041e97
commit 6e7459322d
129 changed files with 213 additions and 219 deletions

View file

@ -45,7 +45,7 @@ static void set_image_path_for_emoji(StringView emoji_resource_path, Emoji& emoj
builder.appendff("U+{:X}", code_point);
}
auto path = DeprecatedString::formatted("{}/{}.png", emoji_resource_path, builder.build());
auto path = DeprecatedString::formatted("{}/{}.png", emoji_resource_path, builder.to_deprecated_string());
if (Core::File::exists(path))
emoji.image_path = move(path);
}
@ -153,7 +153,7 @@ static ErrorOr<void> parse_emoji_serenity_data(Core::Stream::BufferedFile& file,
}
});
auto name = builder.build();
auto name = builder.to_deprecated_string();
if (!any_of(name, is_ascii_lower_alpha))
name = name.to_titlecase();