lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 033d6b6 2/6: Avoid 'auto' where it is not hel


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 033d6b6 2/6: Avoid 'auto' where it is not helpful
Date: Fri, 7 Sep 2018 19:33:54 -0400 (EDT)

branch: master
commit 033d6b60f6f387a6f5afc02486340bdadbcb4726
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Avoid 'auto' where it is not helpful
    
    Every variable in the declaration and definition of class paginator is
    of type 'int'. Declaring some of them as 'auto' impeded comprehension.
---
 report_table.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/report_table.cpp b/report_table.cpp
index 59e5287..bb801f4 100644
--- a/report_table.cpp
+++ b/report_table.cpp
@@ -212,8 +212,8 @@ paginator::paginator(int total_rows, int rows_per_group, 
int max_lines_per_page)
     // to the preceding page if there's room.
     if(1 < page_count_)
         {
-        auto const rows_on_last_page = total_rows_ - (page_count_ - 1) * 
rows_per_page_;
-        auto const free_lines = max_lines_per_page_ - lines_per_group_ * 
groups_per_page_;
+        int const rows_on_last_page = total_rows_ - (page_count_ - 1) * 
rows_per_page_;
+        int const free_lines = max_lines_per_page_ - lines_per_group_ * 
groups_per_page_;
         LMI_ASSERT(free_lines < rows_per_group_);
         if(rows_on_last_page <= free_lines)
             {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]