mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 23:24:57 +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
1615 changed files with 10257 additions and 10257 deletions
|
@ -15,14 +15,14 @@ namespace Web::HTML {
|
|||
|
||||
class ModuleLocationTuple {
|
||||
public:
|
||||
ModuleLocationTuple(AK::URL url, DeprecatedString type)
|
||||
ModuleLocationTuple(AK::URL url, ByteString type)
|
||||
: m_url(move(url))
|
||||
, m_type(move(type))
|
||||
{
|
||||
}
|
||||
|
||||
AK::URL const& url() const { return m_url; }
|
||||
DeprecatedString const& type() const { return m_type; }
|
||||
ByteString const& type() const { return m_type; }
|
||||
|
||||
bool operator==(ModuleLocationTuple const& other) const
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
private:
|
||||
AK::URL m_url;
|
||||
DeprecatedString m_type;
|
||||
ByteString m_type;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#module-map
|
||||
|
@ -56,16 +56,16 @@ public:
|
|||
|
||||
using CallbackFunction = JS::NonnullGCPtr<JS::HeapFunction<void(Entry)>>;
|
||||
|
||||
bool is_fetching(AK::URL const& url, DeprecatedString const& type) const;
|
||||
bool is_failed(AK::URL const& url, DeprecatedString const& type) const;
|
||||
bool is_fetching(AK::URL const& url, ByteString const& type) const;
|
||||
bool is_failed(AK::URL const& url, ByteString const& type) const;
|
||||
|
||||
bool is(AK::URL const& url, DeprecatedString const& type, EntryType) const;
|
||||
bool is(AK::URL const& url, ByteString const& type, EntryType) const;
|
||||
|
||||
Optional<Entry> get(AK::URL const& url, DeprecatedString const& type) const;
|
||||
Optional<Entry> get(AK::URL const& url, ByteString const& type) const;
|
||||
|
||||
AK::HashSetResult set(AK::URL const& url, DeprecatedString const& type, Entry);
|
||||
AK::HashSetResult set(AK::URL const& url, ByteString const& type, Entry);
|
||||
|
||||
void wait_for_change(JS::Heap&, AK::URL const& url, DeprecatedString const& type, Function<void(Entry)> callback);
|
||||
void wait_for_change(JS::Heap&, AK::URL const& url, ByteString const& type, Function<void(Entry)> callback);
|
||||
|
||||
private:
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
@ -84,7 +84,7 @@ template<>
|
|||
struct Traits<Web::HTML::ModuleLocationTuple> : public DefaultTraits<Web::HTML::ModuleLocationTuple> {
|
||||
static unsigned hash(Web::HTML::ModuleLocationTuple const& tuple)
|
||||
{
|
||||
return pair_int_hash(tuple.url().to_deprecated_string().hash(), tuple.type().hash());
|
||||
return pair_int_hash(tuple.url().to_byte_string().hash(), tuple.type().hash());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue