mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Everywhere: Add deprecated_ prefix to JsonValue::to_byte_string
`JsonValue::to_byte_string` has peculiar type-erasure semantics which is not usually intended. Unfortunately, it also has a very stereotypical name which does not warn about unexpected behavior. So let's prefix it with `deprecated_` to make new code use `as_string` if it just wants to get string value or `serialized<StringBuilder>` if it needs to do proper serialization.
This commit is contained in:
parent
4ed5287792
commit
ccd701809f
20 changed files with 46 additions and 50 deletions
|
@ -292,7 +292,7 @@ ErrorOr<NonnullOwnPtr<Profile>> Profile::load_from_perfcore_file(StringView path
|
|||
HashMap<FlatPtr, ByteString> profile_strings;
|
||||
for (FlatPtr string_id = 0; string_id < strings.size(); ++string_id) {
|
||||
auto const& value = strings.at(string_id);
|
||||
profile_strings.set(string_id, value.to_byte_string());
|
||||
profile_strings.set(string_id, value.as_string());
|
||||
}
|
||||
|
||||
auto events_value = object.get_array("events"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue