mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
killall: Prefer StringView over DeprecatedString
This commit is contained in:
parent
344f37986f
commit
4934a1b702
1 changed files with 2 additions and 3 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue