mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
[clang-tidy] use emplace_back
Found with hicpp-use-emplace Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Fabian Homborg
parent
1f01423f46
commit
aff6a74770
@@ -285,11 +285,11 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) {
|
||||
while ((opt = getopt_long(argc, argv, short_opts, long_opts, nullptr)) != -1) {
|
||||
switch (opt) {
|
||||
case 'c': {
|
||||
opts->batch_cmds.push_back(optarg);
|
||||
opts->batch_cmds.emplace_back(optarg);
|
||||
break;
|
||||
}
|
||||
case 'C': {
|
||||
opts->postconfig_cmds.push_back(optarg);
|
||||
opts->postconfig_cmds.emplace_back(optarg);
|
||||
break;
|
||||
}
|
||||
case 'd': {
|
||||
@@ -315,7 +315,7 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) {
|
||||
break;
|
||||
}
|
||||
case 'h': {
|
||||
opts->batch_cmds.push_back("__fish_print_help fish");
|
||||
opts->batch_cmds.emplace_back("__fish_print_help fish");
|
||||
break;
|
||||
}
|
||||
case 'i': {
|
||||
|
||||
Reference in New Issue
Block a user