lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of cod


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of code
Date: Wed, 30 Dec 2020 18:46:57 -0500 (EST)

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

    Prepare to move a block of code
    
    Initialized some data members in terms of product_database::length()
    rather than BasicValues::Length, so that those initializations can be
    moved upstream.
---
 ihs_basicval.cpp | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 28364b8..7996696 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -272,13 +272,14 @@ void BasicValues::GPTServerInit()
     Length = EndtAge - IssueAge;
     LMI_ASSERT(database().length() == Length);
 
-    yare_input_.ExtraMonthlyCustodialFee  .resize(Length);
-    yare_input_.ExtraCompensationOnAssets .resize(Length);
-    yare_input_.ExtraCompensationOnPremium.resize(Length);
-    yare_input_.CurrentCoiMultiplier      .assign(Length, 1.0);
-    yare_input_.SpecifiedAmount           .assign(Length, 
yare_input_.SpecifiedAmount   [0]);
-    yare_input_.DeathBenefitOption        .assign(Length, 
yare_input_.DeathBenefitOption[0]);
-    yare_input_.FlatExtra                 .resize(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_);



reply via email to

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