[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d204fc5 5/5: Write initializers uniformly in
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d204fc5 5/5: Write initializers uniformly in member-specifications |
Date: |
Sun, 12 Mar 2017 21:12:55 -0400 (EDT) |
branch: master
commit d204fc5a3aa1e5f0a9c2a99a5c7e2ab508632d9b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Write initializers uniformly in member-specifications
See:
http://lists.nongnu.org/archive/html/lmi/2017-03/msg00020.html
The 20170305T1926Z commit has here been revised to conform to the style
recently agreed upon:
member_ {default_value_in_braces};
---
authenticity.hpp | 2 +-
datum_base.hpp | 2 +-
fund_data.hpp | 10 +++++-----
gpt_view.hpp | 4 ++--
group_quote_pdf_gen_wx.cpp | 4 ++--
illustration_document.hpp | 2 +-
illustration_view.hpp | 6 +++---
input_sequence_entry.hpp | 10 +++++-----
main_wx_test.cpp | 4 ++--
mec_view.hpp | 4 ++--
product_editor.hpp | 6 +++---
rounding_rules.hpp | 6 +++---
test_coding_rules.cpp | 6 +++---
text_view.hpp | 2 +-
14 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/authenticity.hpp b/authenticity.hpp
index 0ae15ce..5099fc5 100644
--- a/authenticity.hpp
+++ b/authenticity.hpp
@@ -65,7 +65,7 @@ class Authenticity final
static void ResetCache();
- mutable calendar_date CachedDate_ = calendar_date(jdn_t(0));
+ mutable calendar_date CachedDate_ {jdn_t(0)};
};
/// Authenticate production system and its crucial data files.
diff --git a/datum_base.hpp b/datum_base.hpp
index 9b1e97f..18e6c07 100644
--- a/datum_base.hpp
+++ b/datum_base.hpp
@@ -44,7 +44,7 @@ class LMI_SO datum_base
virtual std::ostream& write(std::ostream&) const = 0;
private:
- bool enabled_ = true;
+ bool enabled_ {true};
};
inline std::istream& operator>>(std::istream& is, datum_base& z)
diff --git a/fund_data.hpp b/fund_data.hpp
index ecce17f..63ec475 100644
--- a/fund_data.hpp
+++ b/fund_data.hpp
@@ -53,10 +53,10 @@ class LMI_SO FundInfo final
std::string const& gloss() const;
private:
- double ScalarIMF_ = 0.0;
- std::string ShortName_ = std::string();
- std::string LongName_ = std::string();
- std::string gloss_ = std::string();
+ double ScalarIMF_ {0.0};
+ std::string ShortName_ {};
+ std::string LongName_ {};
+ std::string gloss_ {};
};
class LMI_SO FundData final
@@ -79,7 +79,7 @@ class LMI_SO FundData final
void Read (std::string const& a_Filename);
void Write(std::string const& a_Filename) const;
- std::vector<FundInfo> FundInfo_;
+ std::vector<FundInfo> FundInfo_ {};
};
inline double FundInfo::ScalarIMF() const
diff --git a/gpt_view.hpp b/gpt_view.hpp
index 40e1bac..d2d854a 100644
--- a/gpt_view.hpp
+++ b/gpt_view.hpp
@@ -95,8 +95,8 @@ class gpt_view final
gpt_input& input_data();
- std::string html_content_ = std::string("Unable to display results.");
- wxHtmlWindow* html_window_ = nullptr;
+ std::string html_content_ {"Unable to display results."};
+ wxHtmlWindow* html_window_ {nullptr};
DECLARE_DYNAMIC_CLASS(gpt_view)
DECLARE_EVENT_TABLE()
diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index a5ff966..adb7a58 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -579,8 +579,8 @@ class group_quote_pdf_generator_wx
};
page_metrics page_;
- int row_num_ = 0;
- int individual_selection_ = 99;
+ int row_num_ {0};
+ int individual_selection_ {99};
};
void assert_nonblank(std::string const& value, std::string const& name)
diff --git a/illustration_document.hpp b/illustration_document.hpp
index a3fb354..f3fc8bd 100644
--- a/illustration_document.hpp
+++ b/illustration_document.hpp
@@ -69,7 +69,7 @@ class IllustrationDocument
single_cell_document doc_;
- bool is_phony_ = false;
+ bool is_phony_ {false};
DECLARE_DYNAMIC_CLASS(IllustrationDocument)
};
diff --git a/illustration_view.hpp b/illustration_view.hpp
index ec857cf..ab8b7f3 100644
--- a/illustration_view.hpp
+++ b/illustration_view.hpp
@@ -99,9 +99,9 @@ class IllustrationView final
Input& input_data();
- wxHtmlWindow* html_window_ = nullptr;
- bool is_phony_ = false;
- std::shared_ptr<Ledger const> ledger_values_;
+ wxHtmlWindow* html_window_ {nullptr};
+ bool is_phony_ {false};
+ std::shared_ptr<Ledger const> ledger_values_ {};
DECLARE_DYNAMIC_CLASS(IllustrationView)
DECLARE_EVENT_TABLE()
diff --git a/input_sequence_entry.hpp b/input_sequence_entry.hpp
index 77571e7..fbeedd0 100644
--- a/input_sequence_entry.hpp
+++ b/input_sequence_entry.hpp
@@ -62,12 +62,12 @@ class InputSequenceEntry
void DoOpenEditor();
- Input const* input_ = nullptr;
- std::string field_name_;
+ Input const* input_ {nullptr};
+ std::string field_name_ {};
- wxTextCtrl* text_;
- wxButton* button_;
- wxString title_;
+ wxTextCtrl* text_ {nullptr};
+ wxButton* button_ {nullptr};
+ wxString title_ {};
};
class InputSequenceEntryXmlHandler
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index df364cb..6fec3b8 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -226,9 +226,9 @@ class application_test final
fs::path test_files_path_;
- bool run_all_ = true;
+ bool run_all_ {true};
- bool is_distribution_test_ = false;
+ bool is_distribution_test_ {false};
};
application_test& application_test::instance()
diff --git a/mec_view.hpp b/mec_view.hpp
index b077c0a..67185bf 100644
--- a/mec_view.hpp
+++ b/mec_view.hpp
@@ -95,8 +95,8 @@ class mec_view final
mec_input& input_data();
- std::string html_content_ = std::string("Unable to display results.");
- wxHtmlWindow* html_window_ = nullptr;
+ std::string html_content_ {"Unable to display results."};
+ wxHtmlWindow* html_window_ {nullptr};
DECLARE_DYNAMIC_CLASS(mec_view)
DECLARE_EVENT_TABLE()
diff --git a/product_editor.hpp b/product_editor.hpp
index 062fe3f..1bdcca4 100644
--- a/product_editor.hpp
+++ b/product_editor.hpp
@@ -117,9 +117,9 @@ class TreeGridViewBase
// These objects are held by pointer since the destruction is taken care
// of by wx.
- MultiDimGrid* grid_ = nullptr;
- wxStaticText* grid_label_ = nullptr;
- wxTreeCtrl* tree_ = nullptr;
+ MultiDimGrid* grid_ {nullptr};
+ wxStaticText* grid_label_ {nullptr};
+ wxTreeCtrl* tree_ {nullptr};
};
#endif // product_editor_hpp
diff --git a/rounding_rules.hpp b/rounding_rules.hpp
index cd1e418..1a3735f 100644
--- a/rounding_rules.hpp
+++ b/rounding_rules.hpp
@@ -60,9 +60,9 @@ class LMI_SO rounding_parameters final
/// Private default ctor, for friends only.
rounding_parameters() = default;
- int decimals_ = 0;
- mce_rounding_style style_ = mce_rounding_style(r_indeterminate);
- std::string gloss_ = std::string();
+ int decimals_ {0};
+ mce_rounding_style style_ {r_indeterminate};
+ std::string gloss_ {};
};
/// Product rounding rules.
diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
index 61d1e14..b22b4b3 100644
--- a/test_coding_rules.cpp
+++ b/test_coding_rules.cpp
@@ -1081,9 +1081,9 @@ class statistics
void print_summary() const;
private:
- std::size_t files_ = 0;
- std::size_t lines_ = 0;
- std::size_t defects_ = 0;
+ std::size_t files_ {0};
+ std::size_t lines_ {0};
+ std::size_t defects_ {0};
};
statistics& statistics::operator+=(statistics const& z)
diff --git a/text_view.hpp b/text_view.hpp
index a4745fe..d07f564 100644
--- a/text_view.hpp
+++ b/text_view.hpp
@@ -64,7 +64,7 @@ class TextEditView final
char const* icon_xrc_resource () const override;
char const* menubar_xrc_resource() const override;
- wxTextCtrl* text_window_ = nullptr;
+ wxTextCtrl* text_window_ {nullptr};
DECLARE_DYNAMIC_CLASS(TextEditView)
};