[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5202] Remove trivial accessors recently rendered needless
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5202] Remove trivial accessors recently rendered needless |
Date: |
Sat, 11 Jun 2011 14:26:15 +0000 |
Revision: 5202
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5202
Author: chicares
Date: 2011-06-11 14:26:14 +0000 (Sat, 11 Jun 2011)
Log Message:
-----------
Remove trivial accessors recently rendered needless
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/ihs_avmly.cpp
lmi/trunk/premium_tax.cpp
lmi/trunk/premium_tax.hpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2011-06-09 12:06:09 UTC (rev 5201)
+++ lmi/trunk/ChangeLog 2011-06-11 14:26:14 UTC (rev 5202)
@@ -27985,3 +27985,17 @@
premium_tax.hpp
Improve premium-tax encapsulation.
+20110609T1206Z <address@hidden> [650]
+
+ ihs_avmly.cpp
+ premium_tax.cpp
+ premium_tax.hpp
+Rectify names.
+
+20110611T1426Z <address@hidden> [650]
+
+ ihs_avmly.cpp
+ premium_tax.cpp
+ premium_tax.hpp
+Remove trivial accessors recently rendered needless.
+
Modified: lmi/trunk/ihs_avmly.cpp
===================================================================
--- lmi/trunk/ihs_avmly.cpp 2011-06-09 12:06:09 UTC (rev 5201)
+++ lmi/trunk/ihs_avmly.cpp 2011-06-11 14:26:14 UTC (rev 5202)
@@ -1480,9 +1480,9 @@
+ premium_tax_load_
+ dac_tax_load_
;
- HOPEFULLY(0.0 <= sum_of_separate_loads);
+ LMI_ASSERT(0.0 <= sum_of_separate_loads);
LMI_ASSERT
- ( PremiumTax_->is_tiered_in_tax_state()
+ ( PremiumTax_->is_tiered()
|| materially_equal(total_load, sum_of_separate_loads)
);
Modified: lmi/trunk/premium_tax.cpp
===================================================================
--- lmi/trunk/premium_tax.cpp 2011-06-09 12:06:09 UTC (rev 5201)
+++ lmi/trunk/premium_tax.cpp 2011-06-11 14:26:14 UTC (rev 5202)
@@ -196,7 +196,7 @@
void premium_tax::test_consistency() const
{
- if(is_tiered_in_tax_state())
+ if(is_tiered_in_tax_state_)
{
if(0.0 != load_rate())
{
@@ -212,15 +212,15 @@
}
}
- if(is_tiered_in_domicile())
+ if(is_tiered_in_domicile_)
{
- if(0.0 != domiciliary_load_rate())
+ if(0.0 != domiciliary_load_rate_)
{
fatal_error()
<< "Premium-tax load is tiered in state of domicile "
<< mc_str(domicile_)
<< ", but the product database specifies a scalar load of "
- << domiciliary_load_rate()
+ << domiciliary_load_rate_
<< " instead of zero as expected. Probably the database"
<< " is incorrect."
<< LMI_FLUSH
@@ -258,7 +258,7 @@
double premium_tax::calculate_load(double payment, stratified_charges const&
strata)
{
double tax_in_tax_state = load_rate() * payment;
- if(is_tiered_in_tax_state())
+ if(is_tiered_in_tax_state_)
{
LMI_ASSERT(0.0 == tax_in_tax_state);
tax_in_tax_state = strata.tiered_premium_tax
@@ -270,10 +270,10 @@
ytd_load_in_tax_state_ += tax_in_tax_state;
double tax_in_domicile = 0.0;
- if(is_retaliatory())
+ if(is_retaliatory_)
{
- tax_in_domicile = domiciliary_load_rate() * payment;
- if(is_tiered_in_domicile())
+ tax_in_domicile = domiciliary_load_rate_ * payment;
+ if(is_tiered_in_domicile_)
{
LMI_ASSERT(0.0 == tax_in_domicile);
tax_in_domicile = strata.tiered_premium_tax
@@ -402,23 +402,8 @@
return least_load_rate_;
}
-double premium_tax::domiciliary_load_rate() const
+bool premium_tax::is_tiered() const
{
- return domiciliary_load_rate_;
+ return is_tiered_in_tax_state_ || is_tiered_in_domicile_;
}
-bool premium_tax::is_tiered_in_tax_state() const
-{
- return is_tiered_in_tax_state_;
-}
-
-bool premium_tax::is_tiered_in_domicile() const
-{
- return is_tiered_in_domicile_;
-}
-
-bool premium_tax::is_retaliatory() const
-{
- return is_retaliatory_;
-}
-
Modified: lmi/trunk/premium_tax.hpp
===================================================================
--- lmi/trunk/premium_tax.hpp 2011-06-09 12:06:09 UTC (rev 5201)
+++ lmi/trunk/premium_tax.hpp 2011-06-11 14:26:14 UTC (rev 5202)
@@ -58,10 +58,7 @@
double levy_rate () const;
double load_rate () const;
double least_load_rate () const;
- double domiciliary_load_rate () const;
- bool is_tiered_in_tax_state () const;
- bool is_tiered_in_domicile () const;
- bool is_retaliatory () const;
+ bool is_tiered () const;
private:
void test_consistency() const;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5202] Remove trivial accessors recently rendered needless,
Greg Chicares <=