1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
for (auto& value : sorted_regions) {
auto& map = value.as_object();
auto address = map.get("address"sv).to_addr();
auto size = map.get("size"sv).to_string();
auto size = map.get("size"sv).to_deprecated_string();
auto access = DeprecatedString::formatted("{}{}{}{}{}",
(map.get("readable"sv).to_bool() ? "r" : "-"),
@ -65,13 +65,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
out("{:p} ", address);
out("{:>10} ", size);
if (extended) {
auto resident = map.get("amount_resident"sv).to_string();
auto dirty = map.get("amount_dirty"sv).to_string();
auto vmobject = map.get("vmobject"sv).to_string();
auto resident = map.get("amount_resident"sv).to_deprecated_string();
auto dirty = map.get("amount_dirty"sv).to_deprecated_string();
auto vmobject = map.get("vmobject"sv).to_deprecated_string();
if (vmobject.ends_with("VMObject"sv))
vmobject = vmobject.substring(0, vmobject.length() - 8);
auto purgeable = map.get("purgeable"sv).to_string();
auto cow_pages = map.get("cow_pages"sv).to_string();
auto purgeable = map.get("purgeable"sv).to_deprecated_string();
auto cow_pages = map.get("cow_pages"sv).to_deprecated_string();
out("{:>10} ", resident);
out("{:>10} ", dirty);
out("{:6} ", access);
@ -81,7 +81,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
} else {
out("{:6} ", access);
}
auto name = map.get("name"sv).to_string();
auto name = map.get("name"sv).to_deprecated_string();
out("{:20}", name);
outln();
}