[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master de3be01 2/6: Improve concinnity
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master de3be01 2/6: Improve concinnity |
Date: |
Fri, 21 Jun 2019 18:18:29 -0400 (EDT) |
branch: master
commit de3be01c335862b23d60b93412384259869cd55c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Improve concinnity
Template for unnamed namespaces:
namespace
{
} // Unnamed namespace.
---
authenticity.cpp | 2 +-
basic_tables.cpp | 2 +-
bcc_ld.cpp | 2 +-
crc32.cpp | 2 +-
dbnames.cpp | 1 -
file_command.cpp | 2 +-
group_quote_pdf_gen.cpp | 2 +-
ihs_avsolve.cpp | 2 +-
ihs_irc7702a.cpp | 2 +-
input_sequence_entry.cpp | 1 -
multidimgrid_any.cpp | 3 ---
path_utility_test.cpp | 2 +-
pdf_command_wx.cpp | 1 -
premium_tax.cpp | 3 ++-
rate_table.cpp | 4 ++--
rounding_view_editor.cpp | 2 --
skeleton.cpp | 1 -
solve.cpp | 2 +-
system_command.cpp | 2 +-
tier_view.cpp | 2 --
wx_test_about_version.cpp | 2 +-
wx_test_input_sequences.cpp | 2 +-
wx_test_input_validation.cpp | 2 +-
wx_test_validate_output.cpp | 2 +-
24 files changed, 19 insertions(+), 29 deletions(-)
diff --git a/authenticity.cpp b/authenticity.cpp
index 53c9668..b1d2aae 100644
--- a/authenticity.cpp
+++ b/authenticity.cpp
@@ -49,7 +49,7 @@
namespace
{
int const chars_per_formatted_hex_byte = CHAR_BIT / 4;
-}
+} // Unnamed namespace.
Authenticity& Authenticity::Instance()
{
diff --git a/basic_tables.cpp b/basic_tables.cpp
index a9c66d7..ae55292 100644
--- a/basic_tables.cpp
+++ b/basic_tables.cpp
@@ -115,7 +115,7 @@ std::vector<double> LMI_SO irc_7702_q_builtin
,omega
);
}
-} // Unnamed namespace
+} // Unnamed namespace.
std::vector<double> LMI_SO irc_7702_q
(product_data const& product
diff --git a/bcc_ld.cpp b/bcc_ld.cpp
index 71197b9..626d9bf 100644
--- a/bcc_ld.cpp
+++ b/bcc_ld.cpp
@@ -92,7 +92,7 @@ namespace
oss << "";
return oss.str();
}
-}
+} // Unnamed namespace.
int try_main(int argc, char* argv[])
{
diff --git a/crc32.cpp b/crc32.cpp
index 341712b..bb079f7 100644
--- a/crc32.cpp
+++ b/crc32.cpp
@@ -114,7 +114,7 @@ namespace
static std::vector<unsigned int> const v = make_table_0xedb88320U();
return v;
}
-}
+} // Unnamed namespace.
//============================================================================
CRC::CRC()
diff --git a/dbnames.cpp b/dbnames.cpp
index 01a7020..cfaf499 100644
--- a/dbnames.cpp
+++ b/dbnames.cpp
@@ -94,7 +94,6 @@ std::map<std::string,int> short_name_to_key_map()
}
return m;
}
-
} // Unnamed namespace.
std::vector<db_names> const& GetDBNames()
diff --git a/file_command.cpp b/file_command.cpp
index 235debe..db2a2f7 100644
--- a/file_command.cpp
+++ b/file_command.cpp
@@ -28,7 +28,7 @@
namespace
{
callback<file_command_fp_type> file_command_callback;
-}
+} // Unnamed namespace.
typedef file_command_fp_type FunctionPointer;
template<> FunctionPointer callback<FunctionPointer>::function_pointer_ =
nullptr;
diff --git a/group_quote_pdf_gen.cpp b/group_quote_pdf_gen.cpp
index 16c4876..1999f1b 100644
--- a/group_quote_pdf_gen.cpp
+++ b/group_quote_pdf_gen.cpp
@@ -29,7 +29,7 @@ namespace
{
callback<group_quote_pdf_generator::creator_type>
group_quote_pdf_generator_create_callback;
-} // Unnnamed namespace.
+} // Unnamed namespace.
typedef group_quote_pdf_generator::creator_type FunctionPointer;
template<> FunctionPointer callback<FunctionPointer>::function_pointer_ =
nullptr;
diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 2d6655f..f6842e5 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -50,7 +50,7 @@ namespace
// TODO ?? Shouldn't this be a typedef for a SolveHelper member?
// As it stands, this would seem not to be reentrant.
void (AccountValue::*solve_set_fn)(double);
-}
+} // Unnamed namespace.
class SolveHelper
{
diff --git a/ihs_irc7702a.cpp b/ihs_irc7702a.cpp
index 6280dc2..482e06b 100644
--- a/ihs_irc7702a.cpp
+++ b/ihs_irc7702a.cpp
@@ -48,7 +48,7 @@ static int const months_per_year = 12
;
static int const statutory_max_endowment_age = 100 ;
// TODO ?? TAXATION !! Test period not limited to seven years for survivorship.
static int const usual_test_period_length = 7 ;
-}
+} // Unnamed namespace.
//============================================================================
Irc7702A::Irc7702A
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 9919c76..1b832c7 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -1382,7 +1382,6 @@ InputSequenceButton::InputSequenceButton(wxWindow*
parent, wxWindowID id)
:wxButton(parent, id, "...", wxDefaultPosition, wxDefaultSize,
wxBU_EXACTFIT)
{
}
-
} // Unnamed namespace.
InputSequenceEntry::InputSequenceEntry
diff --git a/multidimgrid_any.cpp b/multidimgrid_any.cpp
index 2eb2cae..4e7e9a3 100644
--- a/multidimgrid_any.cpp
+++ b/multidimgrid_any.cpp
@@ -98,7 +98,6 @@ bool MultiDimTableAny::DoRefreshAxisAdjustment
namespace
{
-
/// MultiDimGridGrid is a customised version of wxGrid
///
/// It is used by MultiDimGrid.
@@ -190,7 +189,6 @@ void MultiDimGridGrid::UponKeyDown(wxKeyEvent& event)
event.Skip();
}
}
-
} // Unnamed namespace.
/// GridRefreshTableDataGuard: Table refresh guard class
@@ -273,7 +271,6 @@ inline unsigned int MDGridGetAxisAdjustRow(unsigned int n)
{
return MDGRID_AXIS_ROW + n * 2 + 1;
}
-
} // Unnamed namespace.
void MultiDimGrid::Init()
diff --git a/path_utility_test.cpp b/path_utility_test.cpp
index ca876f5..86a45c1 100644
--- a/path_utility_test.cpp
+++ b/path_utility_test.cpp
@@ -55,7 +55,7 @@ namespace
fs::ofstream ofs(p);
ofs << p;
}
-}
+} // Unnamed namespace.
void test_modify_directory()
{
diff --git a/pdf_command_wx.cpp b/pdf_command_wx.cpp
index 4aa3146..bfcbf95 100644
--- a/pdf_command_wx.cpp
+++ b/pdf_command_wx.cpp
@@ -68,7 +68,6 @@ LMI_FORCE_LINKING_IN_SITU(pdf_command_wx)
namespace
{
-
// This function is also provided in <boost/algorithm/string/predicate.hpp>,
// but it's arguably not worth adding dependency on this Boost library just for
// this function.
diff --git a/premium_tax.cpp b/premium_tax.cpp
index 277cafd..bf36157 100644
--- a/premium_tax.cpp
+++ b/premium_tax.cpp
@@ -33,7 +33,8 @@
#include <algorithm> // max()
-namespace {
+namespace
+{
/// Determine whether premium tax is retaliatory.
///
/// Here's a general discussion:
diff --git a/rate_table.cpp b/rate_table.cpp
index d3d0afb..6dfa2b4 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -368,7 +368,7 @@ std::ostream& operator<<(std::ostream& os, location_info
const& loc)
return os;
}
-} // anonymous namespace
+} // Unnamed namespace.
// Classes abstracting the difference between text and binary formats: both
// namespaces define the same classes inside them, but the first one works with
@@ -1082,7 +1082,7 @@ void throw_if_missing_field(std::optional<T> const& o,
enum_soa_field field)
}
}
-} // anonymous namespace
+} // Unnamed namespace.
void table_impl::read_string
(std::optional<std::string>& ostr
diff --git a/rounding_view_editor.cpp b/rounding_view_editor.cpp
index 4f9e337..5b88ae7 100644
--- a/rounding_view_editor.cpp
+++ b/rounding_view_editor.cpp
@@ -43,7 +43,6 @@
namespace
{
-
enum enum_rounding_button_id
{e_rbi_not_at_all = wxID_HIGHEST
,e_rbi_to_nearest
@@ -143,7 +142,6 @@ void style_button(wxBitmapButton& button, rounding_style
style, bool selected)
: e_state_hover
));
}
-
} // Unnamed namespace.
BEGIN_EVENT_TABLE(RoundingButtons, wxPanel)
diff --git a/skeleton.cpp b/skeleton.cpp
index 611f06c..e957c76 100644
--- a/skeleton.cpp
+++ b/skeleton.cpp
@@ -865,7 +865,6 @@ namespace
return new_text;
}
-
} // Unnamed namespace.
/// Handle 'Text Paste' events for all windows.
diff --git a/solve.cpp b/solve.cpp
index e5fd1be..4189dec 100644
--- a/solve.cpp
+++ b/solve.cpp
@@ -56,7 +56,7 @@ namespace
int ThatSolveEndYear;
mcenum_gen_basis ThatSolveBasis;
bool only_set_values;
-}
+} // Unnamed namespace.
//============================================================================
// This function isn't static and isn't in an unnamed namespace because
diff --git a/system_command.cpp b/system_command.cpp
index 6fc1008..4ace45b 100644
--- a/system_command.cpp
+++ b/system_command.cpp
@@ -28,7 +28,7 @@
namespace
{
callback<system_command_fp_type> system_command_callback;
-}
+} // Unnamed namespace.
typedef system_command_fp_type FunctionPointer;
template<> FunctionPointer callback<FunctionPointer>::function_pointer_ =
nullptr;
diff --git a/tier_view.cpp b/tier_view.cpp
index 1f3e9fd..f2d9851 100644
--- a/tier_view.cpp
+++ b/tier_view.cpp
@@ -39,7 +39,6 @@
namespace
{
-
struct tier_entity_info
{
e_stratified index;
@@ -88,7 +87,6 @@ tier_entity_info const& tier_tree_item_data::entity_info()
const
{
return entity_info_;
}
-
} // Unnamed namespace.
IMPLEMENT_DYNAMIC_CLASS(TierView, TreeGridViewBase)
diff --git a/wx_test_about_version.cpp b/wx_test_about_version.cpp
index b77b205..293a5d3 100644
--- a/wx_test_about_version.cpp
+++ b/wx_test_about_version.cpp
@@ -159,7 +159,7 @@ wxHtmlWindow* find_html_window(wxWindow* parent,
std::string const& dialog_name)
return html_win;
}
-} // anonymous namespace
+} // Unnamed namespace.
LMI_WX_TEST_CASE(about_dialog_version)
{
diff --git a/wx_test_input_sequences.cpp b/wx_test_input_sequences.cpp
index 044d6a4..4ea2e81 100644
--- a/wx_test_input_sequences.cpp
+++ b/wx_test_input_sequences.cpp
@@ -79,7 +79,7 @@ input_sequence_test_data const test_cases[] =
{ "ProjectedSalary" ,"100000; 105000; 110000 retirement; 0"
},
};
-} // anonymous namespace
+} // Unnamed namespace.
LMI_WX_TEST_CASE(input_sequences)
{
diff --git a/wx_test_input_validation.cpp b/wx_test_input_validation.cpp
index 1b04e03..2670454 100644
--- a/wx_test_input_validation.cpp
+++ b/wx_test_input_validation.cpp
@@ -84,7 +84,7 @@ coi_multiplier_test_data const test_cases[] =
{ "1.1" ,nullptr },
};
-} // anonymous namespace
+} // Unnamed namespace.
LMI_WX_TEST_CASE(input_validation)
{
diff --git a/wx_test_validate_output.cpp b/wx_test_validate_output.cpp
index a431dc8..d2d0fdb 100644
--- a/wx_test_validate_output.cpp
+++ b/wx_test_validate_output.cpp
@@ -378,7 +378,7 @@ void validate_run_cell_and_copy_output
);
}
-} // anonymous namespace
+} // Unnamed namespace.
// Consider renaming this file to 'wx_test_spreadsheet_output.cpp'
// e.g., because its purpose is to test *spreadsheet* output only.
- [lmi-commits] [lmi] master updated (c41f3dd -> 1cd343e), Greg Chicares, 2019/06/21
- [lmi-commits] [lmi] master e1de3f6 3/6: Place 'sample*' classes in an unnamed namespace, Greg Chicares, 2019/06/21
- [lmi-commits] [lmi] master e695a13 4/6: Permit derivation from class product_data, Greg Chicares, 2019/06/21
- [lmi-commits] [lmi] master eac9529 1/6: Make 'make show_env' show more, Greg Chicares, 2019/06/21
- [lmi-commits] [lmi] master de3be01 2/6: Improve concinnity,
Greg Chicares <=
- [lmi-commits] [lmi] master 6130ac9 5/6: Refactor 'sample*.policy' generation, Greg Chicares, 2019/06/21
- [lmi-commits] [lmi] master 1cd343e 6/6: Improve documentation, Greg Chicares, 2019/06/21