diff options
author | Tim Ledbetter <timledbetter@gmail.com> | 2023-05-30 20:25:58 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-31 06:00:45 +0200 |
commit | 4934a1b70205e5177ae38fd43726b32e5d96f784 (patch) | |
tree | 6ef28d8d3fd18e303f4b18c62ec5b8cee6d7c539 /Userland/Utilities | |
parent | 344f37986f278ec9846ea8070c2400697f0dd242 (diff) | |
download | serenity-4934a1b70205e5177ae38fd43726b32e5d96f784.zip |
killall: Prefer StringView over DeprecatedString
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/killall.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Utilities/killall.cpp b/Userland/Utilities/killall.cpp index 80668b1165..013090e91b 100644 --- a/Userland/Utilities/killall.cpp +++ b/Userland/Utilities/killall.cpp @@ -6,7 +6,6 @@ */ #include <AK/CharacterTypes.h> -#include <AK/DeprecatedString.h> #include <LibCore/ProcessStatisticsReader.h> #include <LibCore/System.h> #include <LibMain/Main.h> @@ -20,7 +19,7 @@ static void print_usage_and_exit() exit(1); } -static ErrorOr<int> kill_all(DeprecatedString const& process_name, unsigned const signum) +static ErrorOr<int> kill_all(StringView process_name, unsigned const signum) { auto all_processes = TRY(Core::ProcessStatisticsReader::get_all()); @@ -56,7 +55,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } if (!number.has_value()) - number = DeprecatedString(&arguments.argv[1][1]).to_uint(); + number = arguments.strings[1].substring_view(1).to_uint(); if (!number.has_value()) { warnln("'{}' is not a valid signal name or number", &arguments.argv[1][1]); |