[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fa15960 06/14: Don't touch a ledger object be
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fa15960 06/14: Don't touch a ledger object before calling its Init() |
Date: |
Sat, 29 Aug 2020 19:34:49 -0400 (EDT) |
branch: master
commit fa1596015cb02bb950f4bce8efaba1e6c5f17d5a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Don't touch a ledger object before calling its Init()
Moved several assignments to ledger members from SetInitialValues() to
a place in the function that calls it, so that these assignments occur
after the last call to Init(). None of the assigned values was used
between the old and the new locus of assigment (and it wouldn't make
sense to do so, anyway).
---
ihs_acctval.cpp | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 0ca5046..fccf9be 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -424,6 +424,18 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
VariantValues().Init(*this, GenBasis_, SepBasis_);
InvariantValues().Init(this);
+ // Assume by default that the policy never lapses or becomes a MEC,
+ // so that the lapse and MEC durations are the last possible month.
+ // TODO ?? TAXATION !! Last possible month? Why? In that month, it doesn't
quite
+ // lapse, and it's certainly wrong to assume it becomes a MEC then.
+
+ VariantValues().LapseMonth = 11;
+ VariantValues().LapseYear = BasicValues::GetLength();
+
+ InvariantValues().IsMec = false;
+ InvariantValues().MecMonth = 11;
+ InvariantValues().MecYear = BasicValues::GetLength();
+
OldDBOpt = DeathBfts_->dbopt()[0];
// TAXATION !! 'OldSA' and 'OldDB' need to be distinguished for 7702 and
7702A,
// with inclusion of term dependent on 'TermIsDbFor7702' and
'TermIsDbFor7702A'.
@@ -646,17 +658,8 @@ void AccountValue::SetInitialValues()
TermRiderActive = true;
TermDB = 0.0;
- // Assume by default that the policy never lapses or becomes a MEC,
- // so that the lapse and MEC durations are the last possible month.
- // TODO ?? TAXATION !! Last possible month? Why? In that month, it doesn't
quite
- // lapse, and it's certainly wrong to assume it becomes a MEC then.
ItLapsed = false;
- VariantValues().LapseMonth = 11;
- VariantValues().LapseYear = BasicValues::GetLength();
- InvariantValues().IsMec = false;
- InvariantValues().MecMonth = 11;
- InvariantValues().MecYear = BasicValues::GetLength();
Dcv = yare_input_.InforceDcv;
DcvDeathBft = 0.0;
DcvNaar = 0.0;
- [lmi-commits] [lmi] master updated (c463357 -> 520bb97), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 4c54e90 02/14: Self test: explicitly specify product, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master c2f6854 03/14: Self test: print more timings, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master ccb70ce 04/14: Self test: measure speed for 'finra' as well as 'ill_reg', Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master f6dfcf1 05/14: Filter out self-test timings, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 19be5c7 07/14: Don't initialize what's already been initialized, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 5dec884 01/14: Include appropriate headers, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master fa15960 06/14: Don't touch a ledger object before calling its Init(),
Greg Chicares <=
- [lmi-commits] [lmi] master 520bb97 14/14: Call ledger Init() less repeatedly [340], Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 74927c6 13/14: Eradicate 'EePmt' and 'ErPmt', Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master c017212 08/14: Make 'daily_interest_accounting' harder to overlook, Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 80f3ab4 09/14: Don't touch a ledger object before calling its Init() (bis), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 4a28bc2 10/14: Replace 'EePmt' (antediluvian), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 9ba754c 11/14: Replace 'EePmt' and 'ErPmt' (production), Greg Chicares, 2020/08/29
- [lmi-commits] [lmi] master 5827c93 12/14: No longer assign to 'EePmt' and 'ErPmt', Greg Chicares, 2020/08/29