lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/004 9d9c2b7 06/17: Assert "length" is same i


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/004 9d9c2b7 06/17: Assert "length" is same in two classes
Date: Thu, 24 Dec 2020 10:23:51 -0500 (EST)

branch: valyuta/004
commit 9d9c2b7120f0788818fed43bcdf728d488403701
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Assert "length" is same in two classes
    
    Classes BasicValues and product_database both have "length" members
    representing the number of years to normal maturity. Asserting that
    they're consistent ensures that product_database::length() can be used
    for early initialization of some BasicValues data members.
---
 ihs_basicval.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 834be37..c12d763 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -189,6 +189,7 @@ void BasicValues::Init()
 
     database().query_into(DB_MaturityAge   , EndtAge);
     Length = EndtAge - IssueAge;
+    LMI_ASSERT(database().length() == Length);
 
     database().query_into(DB_LedgerType    , ledger_type_);
     database().query_into(DB_Nonillustrated, nonillustrated_);
@@ -279,6 +280,7 @@ void BasicValues::GPTServerInit()
 
     database().query_into(DB_MaturityAge   , EndtAge);
     Length = EndtAge - IssueAge;
+    LMI_ASSERT(database().length() == Length);
 
     yare_input_.ExtraMonthlyCustodialFee  .resize(Length);
     yare_input_.ExtraCompensationOnAssets .resize(Length);



reply via email to

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