lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master d7f3337 09/24: Move a block of code as just a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master d7f3337 09/24: Move a block of code as just announced
Date: Wed, 30 Dec 2020 18:46:58 -0500 (EST)

branch: master
commit d7f33371225f7f40fb3461dd7abea095ab9e37ab
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Move a block of code as just announced
    
    This is assuredly safe: it relies on a const member
        product_database const              database_;
    and "length" consistency is asserted.
---
 ihs_basicval.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 7996696..c05b54e 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -143,6 +143,15 @@ BasicValues::BasicValues
         );
     yare_input_.DeathBenefitOption         .assign(1, z.value());
 
+    int const db_len = database().length();
+    yare_input_.ExtraMonthlyCustodialFee  .resize(db_len);
+    yare_input_.ExtraCompensationOnAssets .resize(db_len);
+    yare_input_.ExtraCompensationOnPremium.resize(db_len);
+    yare_input_.CurrentCoiMultiplier      .assign(db_len, 1.0);
+    yare_input_.SpecifiedAmount           .assign(db_len, 
yare_input_.SpecifiedAmount   [0]);
+    yare_input_.DeathBenefitOption        .assign(db_len, 
yare_input_.DeathBenefitOption[0]);
+    yare_input_.FlatExtra                 .resize(db_len);
+
     GPTServerInit();
 }
 
@@ -272,15 +281,6 @@ void BasicValues::GPTServerInit()
     Length = EndtAge - IssueAge;
     LMI_ASSERT(database().length() == Length);
 
-    int const db_len = database().length();
-    yare_input_.ExtraMonthlyCustodialFee  .resize(db_len);
-    yare_input_.ExtraCompensationOnAssets .resize(db_len);
-    yare_input_.ExtraCompensationOnPremium.resize(db_len);
-    yare_input_.CurrentCoiMultiplier      .assign(db_len, 1.0);
-    yare_input_.SpecifiedAmount           .assign(db_len, 
yare_input_.SpecifiedAmount   [0]);
-    yare_input_.DeathBenefitOption        .assign(db_len, 
yare_input_.DeathBenefitOption[0]);
-    yare_input_.FlatExtra                 .resize(db_len);
-
     database().query_into(DB_LedgerType    , ledger_type_);
     database().query_into(DB_Nonillustrated, nonillustrated_);
     bool no_longer_issued = database().query<bool>(DB_NoLongerIssued);



reply via email to

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