lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 3c1c205 1/2: Write a space before and after e


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3c1c205 1/2: Write a space before and after each binary arithmetic operator
Date: Sun, 11 Mar 2018 19:28:55 -0400 (EDT)

branch: master
commit 3c1c205b97eba18371642382e244ac8b07fc5f2a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Write a space before and after each binary arithmetic operator
---
 about_dialog.cpp            |  2 +-
 ledger_pdf_generator_wx.cpp |  6 +++---
 main_wx_test.cpp            |  2 +-
 rate_table.cpp              |  8 ++++----
 wx_table_generator.cpp      | 12 ++++++------
 wx_test_paste_census.cpp    |  4 ++--
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/about_dialog.cpp b/about_dialog.cpp
index 4902bb8..de8c829 100644
--- a/about_dialog.cpp
+++ b/about_dialog.cpp
@@ -61,7 +61,7 @@ int AboutDialog::ShowModal()
         );
     html_window->SetBorders(0);
     html_window->SetPage(license_notices_as_html());
-    
html_window->GetInternalRepresentation()->Layout(65*html_window->GetCharWidth());
+    html_window->GetInternalRepresentation()->Layout(65 * 
html_window->GetCharWidth());
     int const width  = html_window->GetInternalRepresentation()->GetWidth ();
     int const height = html_window->GetInternalRepresentation()->GetHeight();
     html_window->SetMinSize(wxSize(width, height));
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index aa04986..f3def5d 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -590,7 +590,7 @@ TAG_HANDLER_BEGIN(scaled_image, "SCALED_IMAGE")
             }
 
         // The scale factor is optional.
-        double scale_factor = 1.;
+        double scale_factor = 1.0;
 
         // But if it is given, we currently specify its inverse in HTML just
         // because it so happens that for the scale factors we use the inverse
@@ -613,7 +613,7 @@ TAG_HANDLER_BEGIN(scaled_image, "SCALED_IMAGE")
                     );
                 }
 
-            scale_factor = 1./inv_factor;
+            scale_factor = 1.0 / inv_factor;
             }
 
         wxImage image;
@@ -1658,7 +1658,7 @@ class page_with_tabular_report
                         rows_in_next_group = year_max - year;
                         }
 
-                    if(pos_y > page_bottom - rows_in_next_group*row_height)
+                    if(pos_y > page_bottom - rows_in_next_group * row_height)
                         {
                         next_page(writer);
                         numbered_page::render(ledger, writer, 
interpolate_html);
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index 7f52d1a..69b1f2f 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -284,7 +284,7 @@ void remove_arg(int n, int& argc, char* argv[])
 {
     // We include argv[argc] in the elements being copied, this guarantees that
     // the array remains 0-terminated.
-    std::memmove(argv + n, argv + n + 1, (argc - n)*sizeof(char*));
+    std::memmove(argv + n, argv + n + 1, (argc - n) * sizeof(char*));
 
     argc--;
 }
diff --git a/rate_table.cpp b/rate_table.cpp
index 4c32a51..37d1308 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -448,7 +448,7 @@ void writer::write_values
     std::vector<double> const& little_endian_values = values;
 #endif // !defined WORDS_BIGENDIAN
 
-    std::size_t const length = values.size()*sizeof(double);
+    std::size_t const length = values.size() * sizeof(double);
 
     // As explained in table_impl::read_values(), length field is too small to
     // store the length of this record in general, but we still write the data
@@ -1271,7 +1271,7 @@ void table_impl::read_values(std::istream& ifs, 
std::uint16_t /* length */)
     unsigned const num_values = get_expected_number_of_values();
 
     values_.resize(num_values);
-    if(!stream_read(ifs, &values_[0], num_values*sizeof(double)))
+    if(!stream_read(ifs, &values_[0], num_values * sizeof(double)))
         {
         alarum() << "failed to read the values" << std::flush;
         }
@@ -1727,7 +1727,7 @@ void table_impl::parse_values(std::istream& is, int& 
line_num)
                 // After the max select age only the last column remains, just
                 // skip the spaces until it.
                 skip_spaces
-                    
(*select_period_*text_format::get_value_width(*num_decimals_)
+                    (*select_period_ * 
text_format::get_value_width(*num_decimals_)
                     ,start
                     ,current
                     ,line_num
@@ -2252,7 +2252,7 @@ unsigned long table_impl::compute_hash_value() const
     std::string s = oss.str();
 
     // Truncate the string for compatibility with the original code.
-    s.resize(values_.size()*value_width);
+    s.resize(values_.size() * value_width);
 
     CRC crc;
     crc += s;
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index ff278d7..a34ca41 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -111,7 +111,7 @@ void wx_table_generator::add_column
             {
             increase_to_if_smaller(width, 
dc_.GetMultiLineTextExtent(header).x);
 
-            width += 2*column_margin_;
+            width += 2 * column_margin_;
             }
         }
 
@@ -210,14 +210,14 @@ void 
wx_table_generator::do_compute_column_widths_if_necessary()
             // We need to round up in division here to be sure that all columns
             // fit into the available width.
             auto const overflow_per_column =
-                (overflow + num_columns - 1)/num_columns;
+                (overflow + num_columns - 1) / num_columns;
             if(overflow_per_column <= 2 * column_margin_)
                 {
                 // We are going to reduce the total width by more than
                 // necessary, in general, because of rounding up above, so
                 // compensate for it by giving 1 extra pixel until we run out
                 // of these "underflow" pixels.
-                auto underflow = overflow_per_column*num_columns - overflow;
+                auto underflow = overflow_per_column * num_columns - overflow;
 
                 for(auto& i : columns_)
                     {
@@ -235,7 +235,7 @@ void 
wx_table_generator::do_compute_column_widths_if_necessary()
                         }
                     }
 
-                column_margin_ -= (overflow_per_column + 1)/2;
+                column_margin_ -= (overflow_per_column + 1) / 2;
 
                 // We condensed the columns enough to make them fit, so no need
                 // for the warning and we don't have any expanding columns, so
@@ -256,7 +256,7 @@ void 
wx_table_generator::do_compute_column_widths_if_necessary()
     if(num_expand)
         {
         int const per_expand
-            = (total_width_ - total_fixed + num_expand - 1)/num_expand;
+            = (total_width_ - total_fixed + num_expand - 1) / num_expand;
 
         for(auto& i : columns_)
             {
@@ -478,7 +478,7 @@ void wx_table_generator::output_super_header
         case oe_render:
             break;
         case oe_only_measure:
-            *pos_y += row_height_*lines.size();
+            *pos_y += row_height_ * lines.size();
             return;
         }
 
diff --git a/wx_test_paste_census.cpp b/wx_test_paste_census.cpp
index 32e4991..04005ff 100644
--- a/wx_test_paste_census.cpp
+++ b/wx_test_paste_census.cpp
@@ -263,8 +263,8 @@ LMI_WX_TEST_CASE(paste_census)
     ui.MouseMove
         (list_window->ClientToScreen
             (wxPoint
-                (10*list_window->GetCharWidth()
-                ,3*list_window->GetCharHeight()
+                (10 * list_window->GetCharWidth()
+                , 3 * list_window->GetCharHeight()
                 )
             )
         );



reply via email to

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