mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09: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
|
@ -5,9 +5,9 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/IntegralMath.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/SourceLocation.h>
|
||||
|
@ -57,7 +57,7 @@ static Optional<URL::Host> parse_opaque_host(StringView input)
|
|||
// currently report validation errors, they are only useful for debugging efforts in the URL parsing code.
|
||||
|
||||
// 4. Return the result of running UTF-8 percent-encode on input using the C0 control percent-encode set.
|
||||
return String::from_deprecated_string(URL::percent_encode(input, URL::PercentEncodeSet::C0Control)).release_value_but_fixme_should_propagate_errors();
|
||||
return String::from_byte_string(URL::percent_encode(input, URL::PercentEncodeSet::C0Control)).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
struct ParsedIPv4Number {
|
||||
|
@ -606,7 +606,7 @@ static Optional<URL::Host> parse_host(StringView input, bool is_opaque = false)
|
|||
// NOTE: This is handled in Unicode::create_unicode_url, to work around the fact that we can't call into LibUnicode here
|
||||
// FIXME: 5. Let asciiDomain be the result of running domain to ASCII with domain and false.
|
||||
// FIXME: 6. If asciiDomain is failure, then return failure.
|
||||
auto ascii_domain_or_error = String::from_deprecated_string(domain);
|
||||
auto ascii_domain_or_error = String::from_byte_string(domain);
|
||||
if (ascii_domain_or_error.is_error())
|
||||
return {};
|
||||
|
||||
|
@ -792,7 +792,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
if (start_index >= end_index)
|
||||
return {};
|
||||
|
||||
DeprecatedString processed_input = raw_input.substring_view(start_index, end_index - start_index);
|
||||
ByteString processed_input = raw_input.substring_view(start_index, end_index - start_index);
|
||||
|
||||
// 2. If input contains any ASCII tab or newline, invalid-URL-unit validation error.
|
||||
// 3. Remove all ASCII tab or newline from input.
|
||||
|
@ -1116,7 +1116,7 @@ URL URLParser::basic_parse(StringView raw_input, Optional<URL> const& base_url,
|
|||
|
||||
// 2. If atSignSeen is true, then prepend "%40" to buffer.
|
||||
if (at_sign_seen) {
|
||||
auto content = buffer.to_deprecated_string();
|
||||
auto content = buffer.to_byte_string();
|
||||
buffer.clear();
|
||||
buffer.append("%40"sv);
|
||||
buffer.append(content);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue