mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-09 00:31:14 -03:00
[clang-tidy] Convert loops to range based
Found with modernize-loop-convert Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
ridiculousfish
parent
1055ff321c
commit
586ac3dfa7
@@ -252,8 +252,8 @@ int run_command_list(std::vector<std::string> *cmds, const io_chain_t &io) {
|
||||
int res = 1;
|
||||
parser_t &parser = parser_t::principal_parser();
|
||||
|
||||
for (size_t i = 0; i < cmds->size(); i++) {
|
||||
const wcstring cmd_wcs = str2wcstring(cmds->at(i));
|
||||
for (const auto &cmd : *cmds) {
|
||||
const wcstring cmd_wcs = str2wcstring(cmd);
|
||||
res = parser.eval(cmd_wcs, io, TOP);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user