1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:47:47 +00:00

AK: Remove StringBuilder::build() in favor of to_deprecated_string()

Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
This commit is contained in:
Linus Groh 2023-01-26 18:58:09 +00:00
parent da81041e97
commit 6e7459322d
129 changed files with 213 additions and 219 deletions

View file

@ -598,7 +598,7 @@ ALWAYS_INLINE bool PosixExtendedParser::parse_repetition_symbol(ByteCode& byteco
number_builder.append(consume().value());
}
auto maybe_minimum = number_builder.build().to_uint();
auto maybe_minimum = number_builder.to_deprecated_string().to_uint();
if (!maybe_minimum.has_value())
return set_error(Error::InvalidBraceContent);
@ -627,7 +627,7 @@ ALWAYS_INLINE bool PosixExtendedParser::parse_repetition_symbol(ByteCode& byteco
number_builder.append(consume().value());
}
if (!number_builder.is_empty()) {
auto value = number_builder.build().to_uint();
auto value = number_builder.to_deprecated_string().to_uint();
if (!value.has_value() || minimum > value.value() || *value > s_maximum_repetition_count)
return set_error(Error::InvalidBraceContent);
@ -2530,7 +2530,7 @@ DeprecatedFlyString ECMA262Parser::read_capture_group_specifier(bool take_starti
builder.append_code_point(code_point);
}
DeprecatedFlyString name = builder.build();
DeprecatedFlyString name = builder.to_deprecated_string();
if (!hit_end || name.is_empty())
set_error(Error::InvalidNameForCaptureGroup);