Rename for loop counter variables to normative 'i' in Dialog_Progress

Several for loops created counter variable t, hiding member variable of
the same name.  Rename those loop counter variables to the normative
name 'i'.

* Why do most of us use 'i' as a loop counter variable?
  https://softwareengineering.stackexchange.com/questions/86904/why-do-most-of-us-use-i-as-a-loop-counter-variable
This commit is contained in:
Mike Fleetwood 2019-04-10 10:58:18 +01:00 committed by Curtis Gedak
parent 63f578a94b
commit 22ce8a4c64
1 changed files with 8 additions and 8 deletions

View File

@ -96,14 +96,14 @@ Dialog_Progress::Dialog_Progress(const std::vector<Device>& devices, const std::
sigc::mem_fun(*this, &Dialog_Progress::on_cell_data_description) );
//fill 'er up
for (unsigned int t = 0; t < operations.size(); ++t)
for (unsigned int i = 0; i < operations.size(); ++i)
{
this->operations[t]->operation_detail.set_description(operations[t]->description, FONT_BOLD);
this->operations[t]->operation_detail.set_treepath(Utils::num_to_str(t));
this->operations[i]->operation_detail.set_description(operations[i]->description, FONT_BOLD);
this->operations[i]->operation_detail.set_treepath(Utils::num_to_str(i));
treerow = *(treestore_operations->append());
treerow[treeview_operations_columns.operation_description] =
this ->operations[t]->operation_detail.get_description();
this->operations[i]->operation_detail.get_description();
}
scrolledwindow.set_shadow_type(Gtk::SHADOW_ETCHED_IN);
@ -404,10 +404,10 @@ void Dialog_Progress::on_save()
}
//Write out each operation
for ( unsigned int t = 0 ; t < operations .size() ; t++ )
for (unsigned int i = 0; i < operations.size(); i++)
{
out << "<p>========================================</p>" << std::endl;
write_operation_details(operations[t]->operation_detail, out);
write_operation_details(operations[i]->operation_detail, out);
}
//Write out proper HTML finish
@ -573,8 +573,8 @@ void Dialog_Progress::write_operation_details(const OperationDetail& operationde
<< "<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>" << std::endl
<< "<td>" << std::endl ;
for ( unsigned int t = 0 ; t < operationdetail .get_childs() .size() ; t++ )
write_operation_details(*(operationdetail.get_childs()[t]), out);
for (unsigned int i = 0; i < operationdetail.get_childs().size(); i++)
write_operation_details(*(operationdetail.get_childs()[i]), out);
out << "</td>" << std::endl << "</tr>" << std::endl ;
}