[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b657767 13/14: Remove conditionals that serve
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b657767 13/14: Remove conditionals that serve no further purpose |
Date: |
Mon, 5 Apr 2021 18:26:47 -0400 (EDT) |
branch: master
commit b65776755bb9551ba22baaeebb30bf5e0aee4d0a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Remove conditionals that serve no further purpose
Ages ago, como rejected the code that was removed in the preceding
commit, presumably because it wasn't just ugly but actually had
undefined behavior. Now that code is gone, and the como conditionals
are no longer useful.
Building with more than one compiler can find errors that may still
demand remediation even decades after that compiler becomes obsolete.
---
gpt_test.cpp | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/gpt_test.cpp b/gpt_test.cpp
index 1f0551b..85446f6 100644
--- a/gpt_test.cpp
+++ b/gpt_test.cpp
@@ -413,9 +413,6 @@ void gpt_test::test_preconditions()
Irc7702 gpt_test::instantiate_old(int issue_age)
{
-#if defined LMI_COMO_WITH_MINGW
- throw "Code that uses this obsolescent class segfaults with como.";
-#else // !defined LMI_COMO_WITH_MINGW
int const length = lmi::ssize(q_m);
// The old class recognizes only one QAB: ADB. So that all QABs
// can be exercised with the new class, use a linear combination
@@ -469,7 +466,6 @@ Irc7702 gpt_test::instantiate_old(int issue_age)
,0.0 // a_InforceGSP
,0.0 // a_InforceCumPremsPaid
);
-#endif // !defined LMI_COMO_WITH_MINGW
}
/// Compare {GSP, GLP opt 1, GLP opt 2} for old and new GPT classes.
@@ -483,14 +479,12 @@ void gpt_test::compare_premiums(int issue_age, double
target)
gpt_cf_triad const z = instantiate_cf();
-#if !defined LMI_COMO_WITH_MINGW
double const f3bft = parms.f3bft ;
double const endt_bft = parms.endt_bft;
// This test of the obsolescent class segfaults with como.
Irc7702 z_old = instantiate_old(issue_age);
// Set target (the other arguments don't matter here).
z_old.Initialize7702(f3bft, endt_bft, mce_option1_for_7702, target);
-#endif // !defined LMI_COMO_WITH_MINGW
int const omega = lmi::ssize(sample_q(0));
LMI_ASSERT(lmi::ssize(qab_waiver_rate) == omega - issue_age);
@@ -500,7 +494,6 @@ void gpt_test::compare_premiums(int issue_age, double
target)
double const r0 = z.calculate_premium(oe_gsp, mce_option1_for_7702,
parms);
double const r1 = z.calculate_premium(oe_glp, mce_option1_for_7702,
parms);
double const r2 = z.calculate_premium(oe_glp, mce_option2_for_7702,
parms);
-#if !defined LMI_COMO_WITH_MINGW
double const r0_old = z_old.CalculateGSP(duration, f3bft, endt_bft,
endt_bft );
double const r1_old = z_old.CalculateGLP(duration, f3bft, endt_bft,
endt_bft, mce_option1_for_7702);
double const r2_old = z_old.CalculateGLP(duration, f3bft, endt_bft,
endt_bft, mce_option2_for_7702);
@@ -520,7 +513,6 @@ void gpt_test::compare_premiums(int issue_age, double
target)
<< std::endl
;
}
-#endif // !defined LMI_COMO_WITH_MINGW
}
}
@@ -611,10 +603,8 @@ void gpt_test::assay_speed()
<< "\n Init parms: " << TimeAnAliquot(v_parms )
<< "\n Triad : " << TimeAnAliquot(instantiate_cf )
<< "\n Prems : " << TimeAnAliquot(mete_premiums )
-#if !defined LMI_COMO_WITH_MINGW
<< "\n Triad old : " << TimeAnAliquot(mete_instantiate_old)
<< "\n Prems old : " << TimeAnAliquot(mete_premiums_old )
-#endif // !defined LMI_COMO_WITH_MINGW
<< std::endl
;
}
- [lmi-commits] [lmi] master updated (dd6ee0a -> 8aa09b9), Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 40218dc 03/14: Factor out commutation-function speed tests, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master b8f43e0 06/14: Transpose several unit-test functions, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master e6ed669 01/14: Test guideline premium calculations with more complications, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master b1eecea 02/14: Stabilize unit-test timing, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 28cabc2 04/14: Prefer lambdas to std::bind(), Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 61a04eb 08/14: Make commutation functions default constructible, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master df25463 12/14: Avoid operator new, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master b657767 13/14: Remove conditionals that serve no further purpose,
Greg Chicares <=
- [lmi-commits] [lmi] master 23fe71f 11/14: Do away with an undesirable smart pointer [290], Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 485e19b 07/14: Favor the rule of zero, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 762056e 05/14: Prefer PETE's operator<<=() to assign(), Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master ed251fc 09/14: Test implicit special member functions, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master c2087ae 10/14: Update a comment, Greg Chicares, 2021/04/05
- [lmi-commits] [lmi] master 8aa09b9 14/14: Expunge some pointless defect markers [287], Greg Chicares, 2021/04/05