[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0a191a7 3/6: Prefer to avoid '/* */' where a
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0a191a7 3/6: Prefer to avoid '/* */' where a good alternative exists |
Date: |
Tue, 4 Sep 2018 20:48:30 -0400 (EDT) |
branch: master
commit 0a191a768af2a1e66d81365457e5db33177afcc7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Prefer to avoid '/* */' where a good alternative exists
---
ihs_irc7702a.hpp | 2 +-
ledger_pdf_generator_wx.cpp | 38 +++++++++++++++++++-------------------
main_wx_test.cpp | 4 ++--
multidimgrid_any.cpp | 2 +-
pdf_writer_wx.cpp | 2 +-
rate_table.cpp | 3 ++-
stratified_charges.cpp | 6 ++++--
7 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/ihs_irc7702a.hpp b/ihs_irc7702a.hpp
index fa853e2..aad4ade 100644
--- a/ihs_irc7702a.hpp
+++ b/ihs_irc7702a.hpp
@@ -152,7 +152,7 @@ class Irc7702A final
// although they physically happen to be so.
// TODO ?? TAXATION !! IOW, 'friend' would be better?
int DebugGetTestDur () const
- {return TestPeriodDur - 1; /* we already incremented it */}
+ {return TestPeriodDur - 1;} // "- 1": already incremented
double DebugGet7ppRate () const
{return SevenPPRateVec[PolicyYear];}
double DebugGetNsp () const
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 938a9d7..da5bd05 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -655,8 +655,8 @@ class page
// This method must not draw anything on the wxDC, it is provided only for
// measurement purposes.
virtual void pre_render
- (Ledger const& ledger
- ,pdf_writer_wx& writer
+ (Ledger const& ledger
+ ,pdf_writer_wx & writer
,html_interpolator const& interpolate_html
)
{
@@ -914,8 +914,8 @@ class cover_page : public page
{
public:
void render
- (Ledger const& /* ledger */
- ,pdf_writer_wx& writer
+ (Ledger const& // ledger
+ ,pdf_writer_wx & writer
,html_interpolator const& interpolate_html
) override
{
@@ -949,8 +949,8 @@ class page_with_footer : public page
// Override pre_render() to compute footer_top_ which is needed in the
// derived classes' overridden get_extra_pages_needed().
void pre_render
- (Ledger const& /* ledger */
- ,pdf_writer_wx& writer
+ (Ledger const& // ledger
+ ,pdf_writer_wx & writer
,html_interpolator const& interpolate_html
) override
{
@@ -994,8 +994,8 @@ class page_with_footer : public page
}
void render
- (Ledger const& /* ledger */
- ,pdf_writer_wx& writer
+ (Ledger const& // ledger
+ ,pdf_writer_wx & writer
,html_interpolator const& interpolate_html
) override
{
@@ -1113,8 +1113,8 @@ class numbered_page : public page_with_footer
}
void pre_render
- (Ledger const& ledger
- ,pdf_writer_wx& writer
+ (Ledger const& ledger
+ ,pdf_writer_wx & writer
,html_interpolator const& interpolate_html
) override
{
@@ -1170,9 +1170,9 @@ class numbered_page : public page_with_footer
// Derived classes may override this method if they may need more than one
// physical page to show their contents.
virtual int get_extra_pages_needed
- (Ledger const& ledger
- ,pdf_writer_wx& writer
- ,html_interpolator const& interpolate_html
+ (Ledger const& ledger
+ ,pdf_writer_wx & writer
+ ,html_interpolator const& interpolate_html
) = 0;
std::string get_page_number() const override
@@ -1237,9 +1237,9 @@ class standard_page : public numbered_page
private:
int get_extra_pages_needed
- (Ledger const& /* ledger */
- ,pdf_writer_wx& writer
- ,html_interpolator const& interpolate_html
+ (Ledger const& // ledger
+ ,pdf_writer_wx & writer
+ ,html_interpolator const& interpolate_html
) override
{
page_html_ = wxString::FromUTF8
@@ -1762,9 +1762,9 @@ class page_with_tabular_report
// Override the base class method as the table may overflow onto the next
// page(s).
int get_extra_pages_needed
- (Ledger const& ledger
- ,pdf_writer_wx& writer
- ,html_interpolator const& interpolate_html
+ (Ledger const& ledger
+ ,pdf_writer_wx& writer
+ ,html_interpolator const& interpolate_html
) override
{
wx_table_generator table_gen{create_table_generator(ledger, writer)};
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index b02b6ff..df5ec53 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -163,7 +163,7 @@ class application_test final
//
// This function consumes all the exceptions thrown during its execution
// and never throws itself.
- TestsResults run() /* noexcept */;
+ TestsResults run(); // noexcept
// Used by LMI_WX_TEST_CASE() macro to register the individual test cases.
void add_test(wx_base_test_case* test);
@@ -795,7 +795,7 @@ void SkeletonTest::RunTheTests()
wxWindow* const top = app_->GetTopWindow();
if(top)
{
- top->Close(true /* force close */);
+ top->Close(true); // force close
}
}
diff --git a/multidimgrid_any.cpp b/multidimgrid_any.cpp
index 5d182a4..47173e1 100644
--- a/multidimgrid_any.cpp
+++ b/multidimgrid_any.cpp
@@ -481,7 +481,7 @@ void MultiDimGrid::DoRefreshTableData()
// columns could be very narrow for axes like age or state):
grid().SetColMinimalWidth(i, WXGRID_DEFAULT_COL_WIDTH);
- grid().AutoSizeColumn(i, false /*setAsMin*/);
+ grid().AutoSizeColumn(i, false); // false: setAsMin
}
grid().ForceRefresh();
diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index 4fd7c03..3589da7 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -110,7 +110,7 @@ pdf_writer_wx::pdf_writer_wx
html_vfs_.reset(new wxFileSystem());
html_vfs_->ChangePathTo
(global_settings::instance().data_directory().string()
- ,true /* argument is a directory, not file path */
+ ,true // argument is a directory, not file path
);
html_parser_.SetFS(html_vfs_.get());
}
diff --git a/rate_table.cpp b/rate_table.cpp
index 6852b2b..f895cd0 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -1253,7 +1253,8 @@ unsigned int table_impl::get_expected_number_of_values()
const
return num_values;
}
-void table_impl::read_values(std::istream& ifs, std::uint16_t /* length */)
+// The second argument (length) is unused, so why does it exist?
+void table_impl::read_values(std::istream& ifs, std::uint16_t)
{
throw_if_duplicate_record(!values_.empty(), e_field_values);
diff --git a/stratified_charges.cpp b/stratified_charges.cpp
index 8431af3..f745a71 100644
--- a/stratified_charges.cpp
+++ b/stratified_charges.cpp
@@ -385,13 +385,15 @@ double
stratified_charges::tiered_investment_management_fee(double assets) const
return tiered_rate<double>() (assets, z.limits(), z.values());
}
-double stratified_charges::tiered_curr_sepacct_load(double assets, double /*
premium */) const
+// The second argument (premium) is unused, so why does it exist?
+double stratified_charges::tiered_curr_sepacct_load(double assets, double)
const
{
stratified_entity const& z = datum("CurrSepAcctLoadTieredByAssets");
return tiered_rate<double>() (assets, z.limits(), z.values());
}
-double stratified_charges::tiered_guar_sepacct_load(double assets, double /*
premium */) const
+// The second argument (premium) is unused, so why does it exist?
+double stratified_charges::tiered_guar_sepacct_load(double assets, double)
const
{
stratified_entity const& z = datum("GuarSepAcctLoadTieredByAssets");
return tiered_rate<double>() (assets, z.limits(), z.values());
- [lmi-commits] [lmi] master updated (b287dea -> 8c51f22), Greg Chicares, 2018/09/04
- [lmi-commits] [lmi] master 449287e 1/6: Rename /lines_per_page_*/ variables, all of which denote a maximum, Greg Chicares, 2018/09/04
- [lmi-commits] [lmi] master 614f824 2/6: Fix typographical errors in comments, Greg Chicares, 2018/09/04
- [lmi-commits] [lmi] master 567e5ac 4/6: Specify unused arguments more clearly, Greg Chicares, 2018/09/04
- [lmi-commits] [lmi] master 0a191a7 3/6: Prefer to avoid '/* */' where a good alternative exists,
Greg Chicares <=
- [lmi-commits] [lmi] master d9ec2b9 5/6: Temporarily suppress a failing assertion, Greg Chicares, 2018/09/04
- [lmi-commits] [lmi] master 8c51f22 6/6: Remove workarounds for old compilers, Greg Chicares, 2018/09/04