mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:37:47 +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,8 +5,8 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/NumberFormat.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -56,7 +56,7 @@ static void closing_statistics()
|
|||
warnln("{}+{} blocks out", statistics.total_blocks_out, statistics.partial_blocks_out);
|
||||
if (statistics.status != Noxfer) {
|
||||
auto elapsed_time = statistics.timer.elapsed_time();
|
||||
DeprecatedString copy_speed = "INF B/s";
|
||||
ByteString copy_speed = "INF B/s";
|
||||
if (!elapsed_time.is_zero()) {
|
||||
auto speed = statistics.total_bytes_copied * 1000 / elapsed_time.to_milliseconds();
|
||||
copy_speed = human_readable_quantity(speed, AK::HumanReadableBasedOn::Base2, "B/s"sv);
|
||||
|
@ -83,7 +83,7 @@ static int handle_io_file_arguments(int& fd, int flags, StringView argument)
|
|||
return -1;
|
||||
}
|
||||
|
||||
fd = open(value.to_deprecated_string().characters(), flags, 0666);
|
||||
fd = open(value.to_byte_string().characters(), flags, 0666);
|
||||
if (fd == -1) {
|
||||
warnln("Unable to open: {}", value);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue