mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +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:
parent
da81041e97
commit
6e7459322d
129 changed files with 213 additions and 219 deletions
|
@ -39,7 +39,7 @@ static DeprecatedString get_salt()
|
|||
auto salt_string = MUST(encode_base64({ random_data, sizeof(random_data) }));
|
||||
builder.append(salt_string);
|
||||
|
||||
return builder.build();
|
||||
return builder.to_deprecated_string();
|
||||
}
|
||||
|
||||
static Vector<gid_t> get_extra_gids(passwd const& pwd)
|
||||
|
@ -196,7 +196,7 @@ void Account::set_password_enabled(bool enabled)
|
|||
StringBuilder builder;
|
||||
builder.append('!');
|
||||
builder.append(m_password_hash);
|
||||
m_password_hash = builder.build();
|
||||
m_password_hash = builder.to_deprecated_string();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ bool ArgsParser::parse(int argc, char* const* argv, FailureBehavior failure_beha
|
|||
}
|
||||
long_options.append({ 0, 0, 0, 0 });
|
||||
|
||||
DeprecatedString short_options = short_options_builder.build();
|
||||
auto short_options = short_options_builder.to_deprecated_string();
|
||||
|
||||
while (true) {
|
||||
int c = getopt_long(argc, argv, short_options.characters(), long_options.data(), nullptr);
|
||||
|
|
|
@ -273,7 +273,7 @@ DeprecatedString DateTime::to_deprecated_string(StringView format) const
|
|||
}
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
return builder.to_deprecated_string();
|
||||
}
|
||||
|
||||
Optional<DateTime> DateTime::parse(StringView format, DeprecatedString const& string)
|
||||
|
|
|
@ -394,7 +394,7 @@ static DeprecatedString get_duplicate_name(DeprecatedString const& path, int dup
|
|||
if (!lexical_path.extension().is_empty()) {
|
||||
duplicated_name.appendff(".{}", lexical_path.extension());
|
||||
}
|
||||
return duplicated_name.build();
|
||||
return duplicated_name.to_deprecated_string();
|
||||
}
|
||||
|
||||
ErrorOr<void, File::CopyError> File::copy_file_or_directory(DeprecatedString const& dst_path, DeprecatedString const& src_path, RecursionMode recursion_mode, LinkMode link_mode, AddDuplicateFileMarker add_duplicate_file_marker, PreserveMode preserve_mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue