1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -14,7 +14,7 @@
namespace Core {
HashMap<uid_t, String> ProcessStatisticsReader::s_usernames;
HashMap<uid_t, DeprecatedString> ProcessStatisticsReader::s_usernames;
Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(RefPtr<Core::File>& proc_all_file, bool include_usernames)
{
@ -110,7 +110,7 @@ Optional<AllProcessesStatistics> ProcessStatisticsReader::get_all(bool include_u
return get_all(proc_all_file, include_usernames);
}
String ProcessStatisticsReader::username_from_uid(uid_t uid)
DeprecatedString ProcessStatisticsReader::username_from_uid(uid_t uid)
{
if (s_usernames.is_empty()) {
setpwent();
@ -122,6 +122,6 @@ String ProcessStatisticsReader::username_from_uid(uid_t uid)
auto it = s_usernames.find(uid);
if (it != s_usernames.end())
return (*it).value;
return String::number(uid);
return DeprecatedString::number(uid);
}
}