mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:34:59 +00:00
Userland: Use Core::ArgsParser's Vector<StringView> API everywhere
...and remove the Vector<String> variant since there are no remaining users of this API.
This commit is contained in:
parent
395ba619d8
commit
f1cc3d0fc4
17 changed files with 31 additions and 47 deletions
|
@ -16,7 +16,7 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
Vector<String> paths;
|
||||
Vector<StringView> paths;
|
||||
Core::ArgsParser args_parser;
|
||||
|
||||
args_parser.set_general_help("Concatente files to stdout with each line in reverse.");
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char** argv)
|
|||
|
||||
if (!paths.is_empty()) {
|
||||
for (auto const& path : paths) {
|
||||
FILE* stream = fopen(path.characters(), "r");
|
||||
FILE* stream = fopen(String(path).characters(), "r");
|
||||
if (!stream) {
|
||||
warnln("Failed to open {}: {}", path, strerror(errno));
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue