lmi-commits
[Top][All Lists]
Advanced

[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
     )
 {



reply via email to

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