lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] odd/zero_columns b503329 1/7: Remove lines that serv


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/zero_columns b503329 1/7: Remove lines that served only to locate failures
Date: Mon, 6 May 2019 07:21:22 -0400 (EDT)

branch: odd/zero_columns
commit b503329d3b3c96d89b9b8c0964a708c825f67833
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove lines that served only to locate failures
    
    Removing these lines, as being now superfluous, makes it easier to
    evaluate actual changes that affect the outcome.
---
 report_table.cpp       | 10 ----------
 wx_table_generator.cpp |  6 ------
 2 files changed, 16 deletions(-)

diff --git a/report_table.cpp b/report_table.cpp
index 5869867..0972569 100644
--- a/report_table.cpp
+++ b/report_table.cpp
@@ -144,17 +144,14 @@ std::vector<int> set_column_widths
 //      alarum() << "Not enough room for even the first column." << LMI_FLUSH;
         }
 
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     // These two are boolean, but vector<bool> isn't a Container.
     std::vector<int> bool_inelastic(n_columns_to_show, false);
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     std::vector<int> bool_elastic  (n_columns_to_show, false);
     for(int j = 0; j < n_columns_to_show; ++j)
         {
         if(all_columns[j].is_elastic()) {bool_elastic  [j] = true;}
         else                            {bool_inelastic[j] = true;}
         }
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
 
     int const residue = max_table_width - data_width;
     LMI_ASSERT(0 <= residue);
@@ -162,28 +159,22 @@ if(0 == cardinality) warning() << __LINE__ << ' ' << 
__FILE__ << LMI_FLUSH;
     // Apportion any residue among inelastic columns, up to the number
     // of such columns times the desired_margin argument.
     int const n_inelastic = std::accumulate(bool_inelastic.begin(), 
bool_inelastic.end(), 0);
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     int const residue_inelastic = std::min(residue, n_inelastic * 
desired_margin);
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     LMI_ASSERT(0 <= residue_inelastic);
     std::vector<int> const delta_inelastic = apportion(bool_inelastic, 
residue_inelastic);
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     // That part of the residue should always be fully consumed.
     LMI_ASSERT(residue_inelastic ==  std::accumulate(delta_inelastic.begin(), 
delta_inelastic.end(), 0));
 
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     // Apportion all remaining residue, if any, among elastic columns.
     int const residue_elastic = residue - residue_inelastic;
     LMI_ASSERT(0 <= residue_elastic);
     std::vector<int> const delta_elastic   = apportion(bool_elastic, 
residue_elastic);
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
 
     std::vector<int> w(cardinality);
     for(int j = 0; j < n_columns_to_show; ++j)
         {
         w[j] = all_columns[j].col_width() + delta_inelastic[j] + 
delta_elastic[j];
         }
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
 
     if(cardinality != n_columns_to_show)
         {
@@ -194,7 +185,6 @@ if(0 == cardinality) warning() << __LINE__ << ' ' << 
__FILE__ << LMI_FLUSH;
             ;
         }
 
-if(0 == cardinality) warning() << __LINE__ << ' ' << __FILE__ << LMI_FLUSH;
     return w;
 }
 
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 182ce45..5df45a7 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -142,7 +142,6 @@ if(0 == lmi::ssize(all_columns_))
         }
     }
 
-if(0 == lmi::ssize(all_columns_)) warning() << __LINE__ << ' ' << __FILE__ << 
LMI_FLUSH;
     std::vector<table_column_info> resized_columns;
     for(int j = 0; j < lmi::ssize(all_columns()); ++j)
         {
@@ -310,7 +309,6 @@ void wx_table_generator::output_highlighted_cell
     dc_.DrawRectangle(cell_rect(column, y));
     }
 
-if(0 == lmi::ssize(all_columns_)) warning() << __LINE__ << ' ' << __FILE__ << 
LMI_FLUSH;
     dc_.DrawLabel(value, text_rect(column, y), wxALIGN_CENTER_HORIZONTAL);
 
     do_output_vert_separator(cell_pos_x(column), y, y + row_height_);
@@ -329,7 +327,6 @@ void wx_table_generator::output_row
 {
     LMI_ASSERT(values.size() == all_columns().size());
     int x = left_margin_;
-if(0 == lmi::ssize(all_columns_)) warning() << __LINE__ << ' ' << __FILE__ << 
LMI_FLUSH;
     do_output_single_row(x, pos_y, values);
 
     if(draw_separators_)
@@ -415,7 +412,6 @@ int wx_table_generator::separator_line_height() const
 wxRect wx_table_generator::external_text_rect(int a_column, int y) const
 {
     int column = indices_[a_column];
-if(0 == lmi::ssize(all_columns_)) warning() << __LINE__ << ' ' << __FILE__ << 
LMI_FLUSH;
     return text_rect(column, y);
 }
 
@@ -495,8 +491,6 @@ void wx_table_generator::do_output_single_row
 {
     int const y_top = pos_y;
 
-if(0 == lmi::ssize(all_columns_)) warning() << __LINE__ << ' ' << __FILE__ << 
LMI_FLUSH;
-
     int const y_text = text_rect(0, pos_y).y;
     pos_y += row_height_;
 



reply via email to

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