[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fc8cf69 13/16: Prefer lmi::ssize() to member
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fc8cf69 13/16: Prefer lmi::ssize() to member size(); rewrite a function out of line |
Date: |
Thu, 15 Nov 2018 17:37:05 -0500 (EST) |
branch: master
commit fc8cf6902435a15509b2a376c7df8cee090cb199
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Prefer lmi::ssize() to member size(); rewrite a function out of line
Moved a trivial inline function from header to TU in order to avoid
adding another include to the header.
---
antediluvian_stubs.cpp | 9 ++++++++-
fund_data.cpp | 6 ++++++
fund_data.hpp | 5 -----
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/antediluvian_stubs.cpp b/antediluvian_stubs.cpp
index eda2636..888621a 100644
--- a/antediluvian_stubs.cpp
+++ b/antediluvian_stubs.cpp
@@ -21,6 +21,7 @@
#include "pchfile.hpp"
+#include "fund_data.hpp"
#include "gpt_server.hpp"
#include "lmi.hpp" // is_antediluvian_fork()
#include "mec_server.hpp"
@@ -42,6 +43,13 @@ bool is_antediluvian_fork()
return true;
}
+// Stubs alphabetized in ASCII order.
+
+int FundData::GetNumberOfFunds() const
+{
+ return 0;
+}
+
gpt_server::gpt_server(mcenum_emission)
{}
@@ -197,4 +205,3 @@ double stratified_charges::tiered_premium_tax(mcenum_state,
double, double) cons
{
return 0.0;
}
-
diff --git a/fund_data.cpp b/fund_data.cpp
index 3809e6b..6acb844 100644
--- a/fund_data.cpp
+++ b/fund_data.cpp
@@ -28,6 +28,7 @@
#include "data_directory.hpp"
#include "my_proem.hpp" // ::write_proem()
#include "platform_dependent.hpp" // access()
+#include "ssize_lmi.hpp"
#include "xml_lmi.hpp"
#include "xml_serialize.hpp"
@@ -81,6 +82,11 @@ FundData::FundData(std::string const& a_Filename)
Read(a_Filename);
}
+int FundData::GetNumberOfFunds() const
+{
+ return lmi::ssize(FundInfo_);
+}
+
namespace
{
std::string const& xml_root_name()
diff --git a/fund_data.hpp b/fund_data.hpp
index ae254f7..b605a26 100644
--- a/fund_data.hpp
+++ b/fund_data.hpp
@@ -107,10 +107,5 @@ inline FundInfo const& FundData::GetFundInfo(int j) const
return FundInfo_[j];
}
-inline int FundData::GetNumberOfFunds() const
-{
- return FundInfo_.size();
-}
-
#endif // fund_data_hpp
- [lmi-commits] [lmi] master 327d53c 06/16: Conditionally suppress selected x86_64-linux-gnu gcc-8 diagnostics, (continued)
- [lmi-commits] [lmi] master 327d53c 06/16: Conditionally suppress selected x86_64-linux-gnu gcc-8 diagnostics, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master a1c1aa0 11/16: Avoid type 'long int', Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 158c2a1 08/16: Suppress x86_64-linux-gnu gcc-8 diagnostics for xmlwrapp, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master db0c484 02/16: Improve default gcc warning options, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master d425a61 10/16: Suppress some 86_64-linux-gnu gcc-8 '-Wconversion' diagnostics, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 9c34f2a 12/16: Don't mix std::size_t with fixed-width integer types, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 89e939b 16/16: Prefer lmi::ssize() to member size(), Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 0c4c5b6 01/16: Improve gcc dialect defaults, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 96dc6f5 07/16: Suppress certain diagnostics for another old boost library, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 5548922 14/16: Avoid gratuitous use of member size(), Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master fc8cf69 13/16: Prefer lmi::ssize() to member size(); rewrite a function out of line,
Greg Chicares <=
- [lmi-commits] [lmi] master f0fd0dc 15/16: Use bourn_cast to convert arithmetic types safely, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master c0a4dde 04/16: Reliably multiply suseconds_t by double, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master 0d09e74 05/16: Make a macro definition conditional, Greg Chicares, 2018/11/15
- [lmi-commits] [lmi] master a00f295 09/16: Avoid std::ptrdiff_t where it's excessively wide for 64-bit builds, Greg Chicares, 2018/11/15