1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 16:34:59 +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

@ -8,17 +8,17 @@
namespace Web::HTML {
bool ModuleMap::is_fetching(AK::URL const& url, String const& type) const
bool ModuleMap::is_fetching(AK::URL const& url, DeprecatedString const& type) const
{
return is(url, type, EntryType::Fetching);
}
bool ModuleMap::is_failed(AK::URL const& url, String const& type) const
bool ModuleMap::is_failed(AK::URL const& url, DeprecatedString const& type) const
{
return is(url, type, EntryType::Failed);
}
bool ModuleMap::is(AK::URL const& url, String const& type, EntryType entry_type) const
bool ModuleMap::is(AK::URL const& url, DeprecatedString const& type, EntryType entry_type) const
{
auto value = m_values.get({ url, type });
if (!value.has_value())
@ -27,12 +27,12 @@ bool ModuleMap::is(AK::URL const& url, String const& type, EntryType entry_type)
return value->type == entry_type;
}
Optional<ModuleMap::Entry> ModuleMap::get(AK::URL const& url, String const& type) const
Optional<ModuleMap::Entry> ModuleMap::get(AK::URL const& url, DeprecatedString const& type) const
{
return m_values.get({ url, type });
}
AK::HashSetResult ModuleMap::set(AK::URL const& url, String const& type, Entry entry)
AK::HashSetResult ModuleMap::set(AK::URL const& url, DeprecatedString const& type, Entry entry)
{
auto callbacks = m_callbacks.get({ url, type });
if (callbacks.has_value())
@ -42,7 +42,7 @@ AK::HashSetResult ModuleMap::set(AK::URL const& url, String const& type, Entry e
return m_values.set({ url, type }, entry);
}
void ModuleMap::wait_for_change(AK::URL const& url, String const& type, Function<void(Entry)> callback)
void ModuleMap::wait_for_change(AK::URL const& url, DeprecatedString const& type, Function<void(Entry)> callback)
{
m_callbacks.ensure({ url, type }).append(move(callback));
}