lmi-commits
[Top][All Lists]
Advanced

[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;



reply via email to

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