mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
builtin_argparse: use std::swap
This commit is contained in:
parent
d837eee09d
commit
9a5022514f
1 changed files with 1 additions and 3 deletions
|
@ -105,9 +105,7 @@ static int check_for_mutually_exclusive_flags(const argparse_cmd_opts_t &opts,
|
||||||
// We want the flag order to be deterministic. Primarily to make unit
|
// We want the flag order to be deterministic. Primarily to make unit
|
||||||
// testing easier.
|
// testing easier.
|
||||||
if (flag1 > flag2) {
|
if (flag1 > flag2) {
|
||||||
wcstring tmp(flag1);
|
std::swap(flag1, flag2);
|
||||||
flag1 = flag2;
|
|
||||||
flag2 = tmp;
|
|
||||||
}
|
}
|
||||||
streams.err.append_format(
|
streams.err.append_format(
|
||||||
_(L"%ls: Mutually exclusive flags '%ls' and `%ls` seen\n"),
|
_(L"%ls: Mutually exclusive flags '%ls' and `%ls` seen\n"),
|
||||||
|
|
Loading…
Reference in a new issue