[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 6a54fd9 09/10: Never read 7702 or 7702A speca
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 6a54fd9 09/10: Never read 7702 or 7702A specamt directly from LedgerInvariant |
Date: |
Fri, 4 Sep 2020 21:16:10 -0400 (EDT) |
branch: master
commit 6a54fd908a827a37db3e1a45a23506486038bc1d
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Never read 7702 or 7702A specamt directly from LedgerInvariant
Always obtain 7702 and 7702A specamt from recently-added accessors,
at least in cases that already do the right thing. In other cases,
marked "TAXATION", doing the right thing might produce regressions,
which are avoided at this time.
---
ihs_acctval.cpp | 10 ++--------
ihs_avstrtgy.cpp | 20 ++++----------------
2 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 7c71d51..93f3f7a 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -409,10 +409,7 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
,mce_annual
,InvariantValues().SpecAmt[0]
);
- double sa =
- InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702 ? InvariantValues().TermSpecAmt[0] : 0.0)
- ;
+ double sa = specamt_for_7702(0);
// Iff partial mortality is used, save yearly values in a vector
// for use elsewhere in this class, and store yearly inforce lives
@@ -494,10 +491,7 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
if(yare_input_.EffectiveDate == yare_input_.InforceAsOfDate)
{
// No need to initialize 'pmts_7702a' in this case.
- bfts_7702a.push_back
- ( InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702A ? InvariantValues().TermSpecAmt[0] : 0.0)
- );
+ bfts_7702a.push_back(specamt_for_7702A(0));
}
else
{
diff --git a/ihs_avstrtgy.cpp b/ihs_avstrtgy.cpp
index a92d084..2196b74 100644
--- a/ihs_avstrtgy.cpp
+++ b/ihs_avstrtgy.cpp
@@ -271,34 +271,22 @@ double AccountValue::DoPerformPmtStrategy
}
case mce_pmt_mep:
{
- double sa =
- InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702A ? InvariantValues().TermSpecAmt[0] : 0.0)
- ;
+ double sa = specamt_for_7702A(0);
return GetModalPremMaxNonMec(0, a_InitialMode, sa);
}
case mce_pmt_glp:
{
- double sa =
- InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702 ? InvariantValues().TermSpecAmt[0] : 0.0)
- ;
+ double sa = specamt_for_7702(0);
return GetModalPremGLP(0, a_InitialMode, sa, sa);
}
case mce_pmt_gsp:
{
- double sa =
- InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702 ? InvariantValues().TermSpecAmt[0] : 0.0)
- ;
+ double sa = specamt_for_7702(0);
return GetModalPremGSP(0, a_InitialMode, sa, sa);
}
case mce_pmt_corridor:
{
- double sa =
- InvariantValues().SpecAmt [0]
- + (TermIsDbFor7702 ? InvariantValues().TermSpecAmt[0] : 0.0)
- ;
+ double sa = specamt_for_7702(0);
return GetModalPremCorridor(0, a_InitialMode, sa);
}
case mce_pmt_table:
- [lmi-commits] [lmi] master updated (520bb97 -> c4f84b4), Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master f2e2cd7 01/10: Refactor to do less work, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master 9878b92 02/10: Refactor, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master 8fa4ca4 03/10: Reformat and append to commentary, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master 4f10238 05/10: Rename a local variable, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master 42f390d 06/10: Improve documentation, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master e8c4054 04/10: Localize a data member, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master e360e0d 07/10: Add some commentary on a marked defect, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master 6a54fd9 09/10: Never read 7702 or 7702A specamt directly from LedgerInvariant,
Greg Chicares <=
- [lmi-commits] [lmi] master f474d10 08/10: Prepare to abstract specified amount, Greg Chicares, 2020/09/04
- [lmi-commits] [lmi] master c4f84b4 10/10: Never read specamt directly from LedgerInvariant, Greg Chicares, 2020/09/04