mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-18 03:41:16 -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
@@ -368,14 +368,14 @@ int builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||
bool is_screen = !streams.out_is_redirected && isatty(STDOUT_FILENO);
|
||||
if (is_screen) {
|
||||
wcstring buff;
|
||||
for (size_t i = 0; i < names.size(); i++) {
|
||||
buff.append(names.at(i));
|
||||
for (const auto &name : names) {
|
||||
buff.append(name);
|
||||
buff.append(L", ");
|
||||
}
|
||||
streams.out.append(reformat_for_screen(buff));
|
||||
} else {
|
||||
for (size_t i = 0; i < names.size(); i++) {
|
||||
streams.out.append(names.at(i).c_str());
|
||||
for (const auto &name : names) {
|
||||
streams.out.append(name.c_str());
|
||||
streams.out.append(L"\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user