mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +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
|
@ -20,14 +20,14 @@ enum class Version {
|
|||
};
|
||||
|
||||
struct Doctype {
|
||||
DeprecatedString type;
|
||||
ByteString type;
|
||||
Vector<MarkupDeclaration> markup_declarations;
|
||||
Optional<ExternalID> external_id;
|
||||
};
|
||||
|
||||
class Document {
|
||||
public:
|
||||
explicit Document(NonnullOwnPtr<Node> root, Optional<Doctype> doctype, HashMap<Name, DeprecatedString> processing_instructions, Version version)
|
||||
explicit Document(NonnullOwnPtr<Node> root, Optional<Doctype> doctype, HashMap<Name, ByteString> processing_instructions, Version version)
|
||||
: m_root(move(root))
|
||||
, m_processing_instructions(move(processing_instructions))
|
||||
, m_version(version)
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
Node& root() { return *m_root; }
|
||||
Node const& root() const { return *m_root; }
|
||||
|
||||
HashMap<Name, DeprecatedString> const& processing_instructions() const { return m_processing_instructions; }
|
||||
HashMap<Name, ByteString> const& processing_instructions() const { return m_processing_instructions; }
|
||||
|
||||
Version version() const { return m_version; }
|
||||
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
private:
|
||||
NonnullOwnPtr<Node> m_root;
|
||||
HashMap<Name, DeprecatedString> m_processing_instructions;
|
||||
HashMap<Name, ByteString> m_processing_instructions;
|
||||
Version m_version;
|
||||
Optional<Doctype> m_explicit_doctype;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -73,7 +73,7 @@ struct AttributeListDeclaration {
|
|||
};
|
||||
struct Enumeration {
|
||||
// FIXME: NMToken
|
||||
HashTable<DeprecatedString> tokens;
|
||||
HashTable<ByteString> tokens;
|
||||
};
|
||||
using Type = Variant<StringType, TokenizedType, NotationType, Enumeration>;
|
||||
|
||||
|
@ -82,10 +82,10 @@ struct AttributeListDeclaration {
|
|||
struct Implied {
|
||||
};
|
||||
struct Fixed {
|
||||
DeprecatedString value;
|
||||
ByteString value;
|
||||
};
|
||||
struct DefaultValue {
|
||||
DeprecatedString value;
|
||||
ByteString value;
|
||||
};
|
||||
|
||||
using Default = Variant<Required, Implied, Fixed, DefaultValue>;
|
||||
|
@ -100,11 +100,11 @@ struct AttributeListDeclaration {
|
|||
};
|
||||
|
||||
struct PublicID {
|
||||
DeprecatedString public_literal;
|
||||
ByteString public_literal;
|
||||
};
|
||||
|
||||
struct SystemID {
|
||||
DeprecatedString system_literal;
|
||||
ByteString system_literal;
|
||||
};
|
||||
|
||||
struct ExternalID {
|
||||
|
@ -119,12 +119,12 @@ struct EntityDefinition {
|
|||
|
||||
struct GEDeclaration {
|
||||
Name name;
|
||||
Variant<DeprecatedString, EntityDefinition> definition;
|
||||
Variant<ByteString, EntityDefinition> definition;
|
||||
};
|
||||
|
||||
struct PEDeclaration {
|
||||
Name name;
|
||||
Variant<DeprecatedString, ExternalID> definition;
|
||||
Variant<ByteString, ExternalID> definition;
|
||||
};
|
||||
|
||||
using EntityDeclaration = Variant<GEDeclaration, PEDeclaration>;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -16,7 +16,7 @@ namespace XML {
|
|||
|
||||
struct Attribute {
|
||||
Name name;
|
||||
DeprecatedString value;
|
||||
ByteString value;
|
||||
};
|
||||
|
||||
struct Offset {
|
||||
|
@ -30,11 +30,11 @@ struct Node {
|
|||
StringBuilder builder;
|
||||
};
|
||||
struct Comment {
|
||||
DeprecatedString text;
|
||||
ByteString text;
|
||||
};
|
||||
struct Element {
|
||||
Name name;
|
||||
HashMap<Name, DeprecatedString> attributes;
|
||||
HashMap<Name, ByteString> attributes;
|
||||
Vector<NonnullOwnPtr<Node>> children;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue