[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c9da0f6 07/24: Assert "length" is same in two
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c9da0f6 07/24: Assert "length" is same in two classes |
Date: |
Wed, 30 Dec 2020 18:46:57 -0500 (EST) |
branch: master
commit c9da0f615e640934c8c26441453d358b056cb85f
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 be6a2f2..28364b8 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -179,6 +179,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_);
@@ -269,6 +270,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);
- [lmi-commits] [lmi] master updated (00ac0ed -> e1047b3), Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 7efa493 05/24: Resolve some marked defects [333], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master c9da0f6 07/24: Assert "length" is same in two classes,
Greg Chicares <=
- [lmi-commits] [lmi] master ac2e25b 03/24: Expunge an unwanted exception class, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master f2efed6 01/24: Guard against accidental Ctrl-D, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master bf59b33 06/24: Resolve or demote some more marked defects [326], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 30412af 04/24: Report a range error when a range error is caught [336], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e7c9da0 08/24: Prepare to move a block of code, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 55a3eb0 12/24: Note an apparent defect [327], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 53e98ab 13/24: Fix defect introduced 20100723T2339Z: wrong jurisdiction [326], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master e4c790a 18/24: Expunge a defect marker [324], Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master d89a676 22/24: Refactor to avoid a header-only implementation, Greg Chicares, 2020/12/30
- [lmi-commits] [lmi] master 3121c90 23/24: Conditionally use H.R. 6800's 7702 transitional rates, Greg Chicares, 2020/12/30