util/OptionParser: use ConstBuffer<const char*> to store argv/argc

This commit is contained in:
Max Kellermann
2018-01-16 10:11:06 +01:00
parent 4a304bf34e
commit 23dff4f209
2 changed files with 6 additions and 7 deletions

View File

@@ -40,9 +40,7 @@ bool
OptionParser::ParseNext() noexcept
{
assert(HasEntries());
const char *arg = *argv;
++argv;
--argc;
const char *arg = args.shift();
if (arg[0] == '-') {
if (arg[1] == '-') {
option = arg + 2;