mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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
|
@ -153,7 +153,7 @@ int main(int argc, char** argv)
|
|||
String fields_list = "";
|
||||
String delimiter = "\t";
|
||||
|
||||
Vector<String> files;
|
||||
Vector<StringView> files;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_positional_argument(files, "file(s) to cut", "file", Core::ArgsParser::Required::No);
|
||||
|
@ -230,7 +230,7 @@ int main(int argc, char** argv)
|
|||
for (auto& file : files) {
|
||||
FILE* fp = stdin;
|
||||
if (!file.is_null()) {
|
||||
fp = fopen(file.characters(), "r");
|
||||
fp = fopen(String(file).characters(), "r");
|
||||
if (!fp) {
|
||||
warnln("cut: Could not open file '{}'", file);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue