[gparted] Rename for loop counter variables to normative 'i' in Dialog_Progress



commit 22ce8a4c642c8401bdf67d2a45d18320c53d8e29
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Wed Apr 10 10:58:18 2019 +0100

    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

 src/Dialog_Progress.cc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index 982733e1..b7d5c4e4 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -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 ;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]