The pulseview(1) application accepts input file specs either as argument
to the -i option, or as positional arguments after the command line options.
Simplify the logic which collects remaining non-option command line words
after getopt(3) is done. As a byproduct the application code no longer
manipulates a variable that is owned by an external library.
break;
}
}
+ argc -= optind;
+ argv += optind;
- while (argc - optind > 0) {
- open_files.push_back(argv[optind]);
- optind++;
- }
+ for (int i = 0; i < argc; i++)
+ open_files.push_back(argv[i]);
// Prepare the global settings since logging needs them early on
pv::GlobalSettings settings;