[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:
Rosen Penev
2019-11-19 13:46:47 -08:00
committed by ridiculousfish
parent 1055ff321c
commit 586ac3dfa7
27 changed files with 85 additions and 105 deletions

View File

@@ -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");
}
}