mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Hex.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
|
@ -37,19 +37,19 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
while (di.has_next()) {
|
||||
auto dir = di.next_path();
|
||||
auto command_set_filename = String::formatted("/sys/devices/storage/{}/command_set", dir);
|
||||
auto command_set_filename = DeprecatedString::formatted("/sys/devices/storage/{}/command_set", dir);
|
||||
auto command_set_file = Core::Stream::File::open(command_set_filename, Core::Stream::OpenMode::Read);
|
||||
if (command_set_file.is_error()) {
|
||||
dbgln("Error: Could not open {}: {}", command_set_filename, command_set_file.error());
|
||||
continue;
|
||||
}
|
||||
auto last_lba_filename = String::formatted("/sys/devices/storage/{}/last_lba", dir);
|
||||
auto last_lba_filename = DeprecatedString::formatted("/sys/devices/storage/{}/last_lba", dir);
|
||||
auto last_lba_file = Core::Stream::File::open(last_lba_filename, Core::Stream::OpenMode::Read);
|
||||
if (last_lba_file.is_error()) {
|
||||
dbgln("Error: Could not open {}: {}", last_lba_filename, last_lba_file.error());
|
||||
continue;
|
||||
}
|
||||
auto sector_size_filename = String::formatted("/sys/devices/storage/{}/sector_size", dir);
|
||||
auto sector_size_filename = DeprecatedString::formatted("/sys/devices/storage/{}/sector_size", dir);
|
||||
auto sector_size_file = Core::Stream::File::open(sector_size_filename, Core::Stream::OpenMode::Read);
|
||||
if (sector_size_file.is_error()) {
|
||||
dbgln("Error: Could not open {}: {}", sector_size_filename, sector_size_file.error());
|
||||
|
@ -61,21 +61,21 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
dbgln("Error: Could not read {}: {}", command_set_filename, maybe_command_set.error());
|
||||
continue;
|
||||
}
|
||||
String command_set = StringView(maybe_command_set.value().bytes());
|
||||
DeprecatedString command_set = StringView(maybe_command_set.value().bytes());
|
||||
|
||||
auto maybe_last_lba = last_lba_file.value()->read_all();
|
||||
if (maybe_last_lba.is_error()) {
|
||||
dbgln("Error: Could not read {}: {}", last_lba_filename, maybe_last_lba.error());
|
||||
continue;
|
||||
}
|
||||
String last_lba = StringView(maybe_last_lba.value().bytes());
|
||||
DeprecatedString last_lba = StringView(maybe_last_lba.value().bytes());
|
||||
|
||||
auto maybe_sector_size = sector_size_file.value()->read_all();
|
||||
if (maybe_sector_size.is_error()) {
|
||||
dbgln("Error: Could not read {}: {}", sector_size_filename, maybe_sector_size.error());
|
||||
continue;
|
||||
}
|
||||
String sector_size = StringView(maybe_sector_size.value().bytes());
|
||||
DeprecatedString sector_size = StringView(maybe_sector_size.value().bytes());
|
||||
|
||||
outln(format_row, dir, command_set, sector_size, last_lba);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue