Use const auto for all jobs

This commit is contained in:
Mahmoud Al-Qudsi
2019-03-20 22:37:26 -05:00
parent d4d5c03a03
commit 36f3a6d7e0
9 changed files with 19 additions and 19 deletions

View File

@@ -2229,7 +2229,7 @@ void reader_bg_job_warning() {
std::fputws(_(L"There are still jobs active:\n"), stdout);
std::fputws(_(L"\n PID Command\n"), stdout);
for (auto j : jobs()) {
for (const auto &j : jobs()) {
if (!j->is_completed()) {
std::fwprintf(stdout, L"%6d %ls\n", j->processes[0]->pid, j->command_wcstr());
}
@@ -2253,7 +2253,7 @@ static void handle_end_loop() {
}
bool bg_jobs = false;
for (const auto j : jobs()) {
for (const auto &j : jobs()) {
if (!j->is_completed()) {
bg_jobs = true;
break;