Skip to content

Commit

Permalink
Simplify IsFlag check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail committed Feb 19, 2025
1 parent ead47e8 commit c32472e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "internal.h"

bool IsFlag(const std::string& arg) {
return arg.length() > 1 && (arg[0] == '-' || (arg.length() > 2 && arg[0] == '-' && arg[1] == '-'));
return arg.length() > 1 && arg[0] == '-';
}

bool ParseKeyValueArguments(args_map_t &out_args,
Expand Down

0 comments on commit c32472e

Please sign in to comment.