[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5384] Prefer to perform initialization in initializer-lis
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5384] Prefer to perform initialization in initializer-list |
Date: |
Fri, 27 Jan 2012 14:16:20 +0000 |
Revision: 5384
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5384
Author: chicares
Date: 2012-01-27 14:16:19 +0000 (Fri, 27 Jan 2012)
Log Message:
-----------
Prefer to perform initialization in initializer-list
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/ihs_irc7702.cpp
lmi/trunk/ihs_irc7702.hpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2012-01-27 12:56:38 UTC (rev 5383)
+++ lmi/trunk/ChangeLog 2012-01-27 14:16:19 UTC (rev 5384)
@@ -29574,3 +29574,19 @@
version.hpp
Designate release candidate.
+20120127T1249Z <address@hidden> [584]
+
+ ihs_irc7702.cpp
+Assert that endowment benefit does not exceed specamt.
+
+20120127T1256Z <address@hidden> [583]
+
+ ihs_irc7702.cpp
+Expunge a redundant comment (cf. line 778).
+
+20120127T1416Z <address@hidden> [581]
+
+ ihs_irc7702.cpp
+ ihs_irc7702.hpp
+Prefer to perform initialization in initializer-list.
+
Modified: lmi/trunk/ihs_irc7702.cpp
===================================================================
--- lmi/trunk/ihs_irc7702.cpp 2012-01-27 12:56:38 UTC (rev 5383)
+++ lmi/trunk/ihs_irc7702.cpp 2012-01-27 14:16:19 UTC (rev 5384)
@@ -161,6 +161,7 @@
,PriorBftAmt (a_PresentBftAmt)
,PresentSpecAmt (a_PresentSpecAmt)
,PriorSpecAmt (a_PresentSpecAmt)
+ ,LeastBftAmtEver (a_LeastBftAmtEver)
,PresentDBOpt (a_PresentDBOpt)
,PriorDBOpt (a_PresentDBOpt)
,AnnChgPol (a_AnnChgPol)
@@ -182,48 +183,27 @@
,InforceCumGLP (a_InforceCumGLP)
,InforceGSP (a_InforceGSP)
,InforceCumPremsPaid(a_InforceCumPremsPaid)
+ ,PresentGLP (a_InforceGLP)
+ ,PriorGLP (a_InforceGLP)
+ ,CumGLP (a_InforceCumGLP)
+ ,PresentGSP (a_InforceGSP)
+ ,PriorGSP (a_InforceGSP)
+ ,GptLimit (std::max(a_InforceCumGLP, a_InforceGSP))
+ ,CumPmts (a_InforceCumPremsPaid)
{
LMI_ASSERT(a_PresentSpecAmt <= a_PresentBftAmt );
LMI_ASSERT(a_LeastBftAmtEver <= a_PresentSpecAmt);
LMI_ASSERT(0.0 <= a_TargetPremium);
- // TODO ?? TAXATION !! Instead put these in initializer-list and write
assertions?
if(0 == InforceYear && 0 == InforceMonth)
{
- PriorBftAmt = a_PresentBftAmt;
- PriorSpecAmt = a_PresentSpecAmt;
- LeastBftAmtEver = a_PresentSpecAmt; // TAXATION !! Why not
a_LeastBftAmtEver?
- PriorDBOpt = PresentDBOpt;
- PresentGLP = 0.0;
- PriorGLP = 0.0;
- CumGLP = 0.0;
- PresentGSP = 0.0;
- PriorGSP = 0.0;
- GptLimit = 0.0;
- CumPmts = 0.0;
+ LMI_ASSERT(0.0 == PresentGLP);
+ LMI_ASSERT(0.0 == PriorGLP );
+ LMI_ASSERT(0.0 == CumGLP );
+ LMI_ASSERT(0.0 == PresentGSP);
+ LMI_ASSERT(0.0 == PriorGSP );
+ LMI_ASSERT(0.0 == GptLimit );
+ LMI_ASSERT(0.0 == CumPmts );
}
- else
- {
- // TAXATION !! Why Prior from Prior here, but from Present above?
- // and, below, from Present for dbopt?
- PriorBftAmt = a_PresentBftAmt;
- PriorSpecAmt = a_PresentSpecAmt;
- LeastBftAmtEver = a_LeastBftAmtEver;
- LMI_ASSERT(LeastBftAmtEver <= PriorBftAmt);
- LMI_ASSERT(LeastBftAmtEver <= PresentBftAmt);
- PriorDBOpt = PresentDBOpt; // TODO ?? TAXATION !! handle this
(and some others) in initializer-list instead
- PresentGLP = InforceGLP;
- PriorGLP = InforceGLP;
- CumGLP = InforceCumGLP;
- PresentGSP = InforceGSP;
- PriorGSP = InforceGSP;
- GptLimit = std::max(CumGLP, PresentGSP);
- CumPmts = a_InforceCumPremsPaid;
-// TAXATION !! Are these comments still useful?
-// to handle inforce, we need to know:
-// the quantity A in A+B-C (i.e. both GSP and GLP)
-// CumGLP
-// CumPmts--as specially defined by 7702
- }
Init();
}
Modified: lmi/trunk/ihs_irc7702.hpp
===================================================================
--- lmi/trunk/ihs_irc7702.hpp 2012-01-27 12:56:38 UTC (rev 5383)
+++ lmi/trunk/ihs_irc7702.hpp 2012-01-27 14:16:19 UTC (rev 5384)
@@ -222,9 +222,9 @@
double PresentGLP;
double PriorGLP;
+ double CumGLP; // Cumulative GLP
double PresentGSP;
double PriorGSP;
- double CumGLP; // Cumulative GLP
double GptLimit; // Guideline limit: max(cum GLP,
GSP)
double CumPmts; // Cumulative payments
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5384] Prefer to perform initialization in initializer-list,
Greg Chicares <=