diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2022-03-23 17:13:11 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-24 11:57:51 +0100 |
commit | 546a6a80a75ce740f0ea98a4acbc5d67151685f6 (patch) | |
tree | fa59eb78b6e73b4822a135e3f14895658cb9c5dd | |
parent | 45ac5e90b72d8042bc814b4883aaab5eb3ddd668 (diff) | |
download | serenity-546a6a80a75ce740f0ea98a4acbc5d67151685f6.zip |
readlink: Use StringView instead of const char*
-rw-r--r-- | Userland/Utilities/readlink.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/readlink.cpp b/Userland/Utilities/readlink.cpp index f0c5168a9f..f32492676b 100644 --- a/Userland/Utilities/readlink.cpp +++ b/Userland/Utilities/readlink.cpp @@ -14,14 +14,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(Core::System::pledge("stdio rpath")); bool no_newline = false; - Vector<const char*> paths; + Vector<StringView> paths; Core::ArgsParser args_parser; args_parser.add_option(no_newline, "Do not append a newline", "no-newline", 'n'); args_parser.add_positional_argument(paths, "Symlink path", "path"); args_parser.parse(arguments); - for (const char* path : paths) { + for (auto path : paths) { auto destination = TRY(Core::File::read_link(path)); out("{}", destination); if (!no_newline) |