mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:47:35 +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:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -37,7 +37,7 @@ void Parser::set_document(WeakPtr<Document> const& document)
|
|||
m_document = document;
|
||||
}
|
||||
|
||||
String Parser::parse_comment()
|
||||
DeprecatedString Parser::parse_comment()
|
||||
{
|
||||
if (!m_reader.matches('%'))
|
||||
return {};
|
||||
|
@ -47,7 +47,7 @@ String Parser::parse_comment()
|
|||
m_reader.move_until([&](auto) {
|
||||
return m_reader.matches_eol();
|
||||
});
|
||||
String str = StringView(m_reader.bytes().slice(comment_start_offset, m_reader.offset() - comment_start_offset));
|
||||
DeprecatedString str = StringView(m_reader.bytes().slice(comment_start_offset, m_reader.offset() - comment_start_offset));
|
||||
m_reader.consume_eol();
|
||||
m_reader.consume_whitespace();
|
||||
return str;
|
||||
|
@ -98,7 +98,7 @@ PDFErrorOr<Value> Parser::parse_value(CanBeIndirectValue can_be_indirect_value)
|
|||
if (m_reader.matches('['))
|
||||
return TRY(parse_array());
|
||||
|
||||
return error(String::formatted("Unexpected char \"{}\"", m_reader.peek()));
|
||||
return error(DeprecatedString::formatted("Unexpected char \"{}\"", m_reader.peek()));
|
||||
}
|
||||
|
||||
PDFErrorOr<Value> Parser::parse_possible_indirect_value_or_ref()
|
||||
|
@ -193,7 +193,7 @@ PDFErrorOr<Value> Parser::parse_number()
|
|||
|
||||
m_reader.consume_whitespace();
|
||||
|
||||
auto string = String(m_reader.bytes().slice(start_offset, m_reader.offset() - start_offset));
|
||||
auto string = DeprecatedString(m_reader.bytes().slice(start_offset, m_reader.offset() - start_offset));
|
||||
if (is_float)
|
||||
return Value(strtof(string.characters(), nullptr));
|
||||
|
||||
|
@ -240,7 +240,7 @@ NonnullRefPtr<StringObject> Parser::parse_string()
|
|||
{
|
||||
ScopeGuard guard([&] { m_reader.consume_whitespace(); });
|
||||
|
||||
String string;
|
||||
DeprecatedString string;
|
||||
bool is_binary_string;
|
||||
|
||||
if (m_reader.matches('(')) {
|
||||
|
@ -272,7 +272,7 @@ NonnullRefPtr<StringObject> Parser::parse_string()
|
|||
return string_object;
|
||||
}
|
||||
|
||||
String Parser::parse_literal_string()
|
||||
DeprecatedString Parser::parse_literal_string()
|
||||
{
|
||||
VERIFY(m_reader.consume('('));
|
||||
StringBuilder builder;
|
||||
|
@ -350,7 +350,7 @@ String Parser::parse_literal_string()
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
String Parser::parse_hex_string()
|
||||
DeprecatedString Parser::parse_hex_string()
|
||||
{
|
||||
VERIFY(m_reader.consume('<'));
|
||||
|
||||
|
@ -558,7 +558,7 @@ PDFErrorOr<Vector<Operator>> Parser::parse_operators()
|
|||
}
|
||||
|
||||
Error Parser::error(
|
||||
String const& message
|
||||
DeprecatedString const& message
|
||||
#ifdef PDF_DEBUG
|
||||
,
|
||||
SourceLocation loc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue