[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fac6d21 8/9: Rename local variables in one fu
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fac6d21 8/9: Rename local variables in one function |
Date: |
Thu, 4 Oct 2018 19:24:15 -0400 (EDT) |
branch: master
commit fac6d21ae452b80d4f5fdc30da36e5f63e8422bf
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Rename local variables in one function
Renamed three local variables: snake_case with no trailing underscore.
---
ledger_evaluator.cpp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index fbac1dd..d02882b 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -728,16 +728,16 @@ ledger_evaluator Ledger::make_evaluator() const
// however, code changes are required, and this is as appropriate
// a place as any to make them.
- LedgerInvariant const& Invar = GetLedgerInvariant();
- LedgerVariant const& Curr_ = GetCurrFull();
- LedgerVariant const& Guar_ = GetGuarFull();
+ LedgerInvariant const& invar = GetLedgerInvariant();
+ LedgerVariant const& curr = GetCurrFull();
+ LedgerVariant const& guar = GetGuarFull();
std::vector<double> PremiumLoad(max_duration);
std::vector<double> MiscCharges(max_duration);
for(int j = 0; j < max_duration; ++j)
{
- PremiumLoad[j] = Invar.GrossPmt[j] - Curr_.NetPmt[j];
- MiscCharges[j] = Curr_.SpecAmtLoad[j] + Curr_.PolicyFee[j];
+ PremiumLoad[j] = invar.GrossPmt[j] - curr.NetPmt[j];
+ MiscCharges[j] = curr.SpecAmtLoad[j] + curr.PolicyFee[j];
}
vectors ["PremiumLoad"] = &PremiumLoad;
@@ -752,12 +752,12 @@ ledger_evaluator Ledger::make_evaluator() const
// ET !! Easier to write as
// std::vector<double> NetDeathBenefit =
- // Curr_.EOYDeathBft - Curr_.TotalLoanBalance;
- std::vector<double> NetDeathBenefit(Curr_.EOYDeathBft);
+ // curr.EOYDeathBft - curr.TotalLoanBalance;
+ std::vector<double> NetDeathBenefit(curr.EOYDeathBft);
std::transform
(NetDeathBenefit.begin()
,NetDeathBenefit.end()
- ,Curr_.TotalLoanBalance.begin()
+ ,curr.TotalLoanBalance.begin()
,NetDeathBenefit.begin()
,std::minus<double>()
);
@@ -766,8 +766,8 @@ ledger_evaluator Ledger::make_evaluator() const
mask_map ["NetDeathBenefit"] = "999,999,999";
format_map["NetDeathBenefit"] = f1;
- std::vector<double> SupplDeathBft_Current (Curr_.TermPurchased);
- std::vector<double> SupplDeathBft_Guaranteed(Guar_.TermPurchased);
+ std::vector<double> SupplDeathBft_Current (curr.TermPurchased);
+ std::vector<double> SupplDeathBft_Guaranteed(guar.TermPurchased);
vectors ["SupplDeathBft_Current" ] = &SupplDeathBft_Current;
vectors ["SupplDeathBft_Guaranteed"] = &SupplDeathBft_Guaranteed;
title_map ["SupplDeathBft_Current" ] = "Curr Suppl\nDeath\nBenefit";
@@ -777,7 +777,7 @@ ledger_evaluator Ledger::make_evaluator() const
format_map["SupplDeathBft_Current" ] = f1;
format_map["SupplDeathBft_Guaranteed"] = f1;
- std::vector<double> SupplSpecAmt(Invar.TermSpecAmt);
+ std::vector<double> SupplSpecAmt(invar.TermSpecAmt);
vectors ["SupplSpecAmt" ] = &SupplSpecAmt;
title_map ["SupplSpecAmt" ] = "Suppl\nSpecified\nAmount";
mask_map ["SupplSpecAmt" ] = "999,999,999";
- [lmi-commits] [lmi] master updated (b3e084f -> b36660c), Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master af5a41d 2/9: Demonstrate the nugatoriness of composite_lapse_year_, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master b957c49 1/9: Rewrite write_tsv(), Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 1d9b6e9 4/9: Store a useful value; discard a useless one, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 579a4f4 3/9: Simplify [378], Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master fac6d21 8/9: Rename local variables in one function,
Greg Chicares <=
- [lmi-commits] [lmi] master 4c6e6c3 6/9: Prefer bourn_cast to static_cast for arithmetic type conversions, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master b36660c 9/9: Define short aliases early; use them wherever possible, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 18f1ca3 7/9: Refactor to remove duplication, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 797a8b8 5/9: Rename a member function, Greg Chicares, 2018/10/04