mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
Notes:
sideshowbarker
2024-07-16 23:38:54 +09:00
Author: https://github.com/alimpfard
Commit: 5e1499d104
Pull-request: https://github.com/SerenityOS/serenity/pull/22325
1615 changed files with 10257 additions and 10257 deletions
|
@ -21,17 +21,17 @@ void ModuleMap::visit_edges(Visitor& visitor)
|
|||
visitor.visit(callback);
|
||||
}
|
||||
|
||||
bool ModuleMap::is_fetching(AK::URL const& url, DeprecatedString const& type) const
|
||||
bool ModuleMap::is_fetching(AK::URL const& url, ByteString const& type) const
|
||||
{
|
||||
return is(url, type, EntryType::Fetching);
|
||||
}
|
||||
|
||||
bool ModuleMap::is_failed(AK::URL const& url, DeprecatedString const& type) const
|
||||
bool ModuleMap::is_failed(AK::URL const& url, ByteString const& type) const
|
||||
{
|
||||
return is(url, type, EntryType::Failed);
|
||||
}
|
||||
|
||||
bool ModuleMap::is(AK::URL const& url, DeprecatedString const& type, EntryType entry_type) const
|
||||
bool ModuleMap::is(AK::URL const& url, ByteString const& type, EntryType entry_type) const
|
||||
{
|
||||
auto value = m_values.get({ url, type });
|
||||
if (!value.has_value())
|
||||
|
@ -40,12 +40,12 @@ bool ModuleMap::is(AK::URL const& url, DeprecatedString const& type, EntryType e
|
|||
return value->type == entry_type;
|
||||
}
|
||||
|
||||
Optional<ModuleMap::Entry> ModuleMap::get(AK::URL const& url, DeprecatedString const& type) const
|
||||
Optional<ModuleMap::Entry> ModuleMap::get(AK::URL const& url, ByteString const& type) const
|
||||
{
|
||||
return m_values.get({ url, type });
|
||||
}
|
||||
|
||||
AK::HashSetResult ModuleMap::set(AK::URL const& url, DeprecatedString const& type, Entry entry)
|
||||
AK::HashSetResult ModuleMap::set(AK::URL const& url, ByteString const& type, Entry entry)
|
||||
{
|
||||
// NOTE: Re-entering this function while firing wait_for_change callbacks is not allowed.
|
||||
VERIFY(!m_firing_callbacks);
|
||||
|
@ -63,7 +63,7 @@ AK::HashSetResult ModuleMap::set(AK::URL const& url, DeprecatedString const& typ
|
|||
return value;
|
||||
}
|
||||
|
||||
void ModuleMap::wait_for_change(JS::Heap& heap, AK::URL const& url, DeprecatedString const& type, Function<void(Entry)> callback)
|
||||
void ModuleMap::wait_for_change(JS::Heap& heap, AK::URL const& url, ByteString const& type, Function<void(Entry)> callback)
|
||||
{
|
||||
m_callbacks.ensure({ url, type }).append(JS::create_heap_function(heap, move(callback)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue