[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f4d2b2c 6/7: Include headers iff used, statin
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f4d2b2c 6/7: Include headers iff used, stating reasons if not obvious |
Date: |
Tue, 27 Jun 2017 17:13:48 -0400 (EDT) |
branch: master
commit f4d2b2c5baedaebd3897242290f73054b9acd124
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Include headers iff used, stating reasons if not obvious
Incidentally improved formatting.
---
ledger_base.cpp | 10 ++++------
ledger_base.hpp | 18 ++++++++----------
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/ledger_base.cpp b/ledger_base.cpp
index e86fdb7..2fadc4e 100644
--- a/ledger_base.cpp
+++ b/ledger_base.cpp
@@ -29,11 +29,9 @@
#include "miscellany.hpp" // minmax
#include "value_cast.hpp"
-#include <algorithm>
-#include <cmath> // std::pow()
-#include <functional>
-#include <numeric>
-#include <string>
+#include <algorithm> // std::max(), std::min(),
std::transform()
+#include <cmath> // std::floor(), std::log10(),
std::pow()
+#include <functional> // std::multiplies
//============================================================================
LedgerBase::LedgerBase(int a_Length)
@@ -221,7 +219,7 @@ namespace
// cell issue dates differ, the result is valid only in that probably-
// unexpected sense.
LedgerBase& LedgerBase::PlusEq
- (LedgerBase const& a_Addend
+ (LedgerBase const& a_Addend
,std::vector<double> const& a_Inforce
)
{
diff --git a/ledger_base.hpp b/ledger_base.hpp
index 3d48f37..18a5295 100644
--- a/ledger_base.hpp
+++ b/ledger_base.hpp
@@ -26,14 +26,12 @@
#include "so_attributes.hpp"
-#include <algorithm>
+#include <algorithm> // std::copy()
#include <cfloat> // DECIMAL_DIG
-#include <functional>
-#include <iomanip>
-#include <ios>
-#include <iosfwd>
+#include <iomanip> // std::setprecision()
#include <iterator> // std::ostream_iterator
#include <map>
+#include <ostream>
#include <string>
#include <vector>
@@ -196,13 +194,13 @@ class LMI_SO LedgerBase
void Initialize(int a_Length);
LedgerBase& PlusEq
- (LedgerBase const& a_Addend
+ (LedgerBase const& a_Addend
,std::vector<double> const& a_Inforce
);
virtual int GetLength() const = 0;
- virtual void UpdateCRC(CRC& crc) const;
- virtual void Spew(std::ostream& os) const;
+ virtual void UpdateCRC(CRC&) const;
+ virtual void Spew(std::ostream&) const;
// TODO ?? A priori, protected data is a defect.
@@ -237,8 +235,8 @@ class LMI_SO LedgerBase
};
template<typename T> void SpewVector
- (std::ostream& os
- ,std::string const& name
+ (std::ostream & os
+ ,std::string const& name
,std::vector<T> const& elements
)
{
- [lmi-commits] [lmi] master updated (84e96df -> 47d6100), Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master b4420a3 3/7: Fix misspellings, Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master 7a09c77 2/7: Set 'badbit' for null stream, Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master eb90054 4/7: Do not use value_cast in decimal_root(), Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master c80737e 1/7: Measure minimum_birthdate() speed in unit test, Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master 47d6100 7/7: Suppress all output to null stream in decimal_root(), Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master 1f03a06 5/7: Expunge max_stream_precision(), Greg Chicares, 2017/06/27
- [lmi-commits] [lmi] master f4d2b2c 6/7: Include headers iff used, stating reasons if not obvious,
Greg Chicares <=