[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 9cf4517 46/65: c()
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 9cf4517 46/65: c() |
Date: |
Wed, 16 Sep 2020 16:55:19 -0400 (EDT) |
branch: valyuta/002
commit 9cf4517923749322eba38ec1aa403c7bec239d8a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
c()
---
outlay.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/outlay.cpp b/outlay.cpp
index c5fe894..df33a11 100644
--- a/outlay.cpp
+++ b/outlay.cpp
@@ -37,9 +37,9 @@ modal_outlay::modal_outlay
:round_gross_premium_ {round_gross_premium}
,round_withdrawal_ {round_withdrawal }
,round_loan_ {round_loan }
- ,dumpin_ {round_gross_premium_( yi.Dumpin)
}
- ,external_1035_amount_ {round_gross_premium_(
yi.External1035ExchangeAmount)}
- ,internal_1035_amount_ {round_gross_premium_(
yi.Internal1035ExchangeAmount)}
+ ,dumpin_ {round_gross_premium_.c(yi.Dumpin)
}
+ ,external_1035_amount_
{round_gross_premium_.c(yi.External1035ExchangeAmount)}
+ ,internal_1035_amount_
{round_gross_premium_.c(yi.Internal1035ExchangeAmount)}
,ee_modal_premiums_ {round_gross_premium_.c(yi.Payment)
}
,ee_premium_modes_ { yi.PaymentMode
}
,er_modal_premiums_ {round_gross_premium_.c(yi.CorporationPayment)
}
@@ -51,30 +51,30 @@ modal_outlay::modal_outlay
void modal_outlay::set_external_1035_amount(currency z)
{
- external_1035_amount_ = round_gross_premium_(z);
+ external_1035_amount_ = round_gross_premium_.c(z);
}
void modal_outlay::set_internal_1035_amount(currency z)
{
- internal_1035_amount_ = round_gross_premium_(z);
+ internal_1035_amount_ = round_gross_premium_.c(z);
}
void modal_outlay::set_ee_modal_premiums(currency z, int from_year, int
to_year)
{
- z = round_gross_premium_(z);
+ z = round_gross_premium_.c(z); // already rounded?
std::fill_n(ee_modal_premiums_.begin() + from_year, to_year - from_year,
z);
}
void modal_outlay::set_er_modal_premiums(currency z, int from_year, int
to_year)
{
- z = round_gross_premium_(z);
+ z = round_gross_premium_.c(z); // already rounded?
std::fill_n(er_modal_premiums_.begin() + from_year, to_year - from_year,
z);
}
void modal_outlay::set_er_modal_premiums(std::vector<currency> const& z)
{
LMI_ASSERT(z.size() == er_modal_premiums_.size());
-// er_modal_premiums_ = round_gross_premium_(z);
+// er_modal_premiums_ = round_gross_premium_.c(z);
// Temporarily disregard rounding, which remains necessary: the
// new value is currency, so it's rounded to cents somehow, but
// premiums could be rounded differently--say, up to dollars.
@@ -83,12 +83,12 @@ void
modal_outlay::set_er_modal_premiums(std::vector<currency> const& z)
void modal_outlay::set_withdrawals(currency z, int from_year, int to_year)
{
- z = round_withdrawal_(z);
+ z = round_withdrawal_.c(z);
std::fill_n(withdrawals_.begin() + from_year, to_year - from_year, z);
}
void modal_outlay::set_new_cash_loans(currency z, int from_year, int to_year)
{
- z = round_loan_(z);
+ z = round_loan_.c(z);
std::fill_n(new_cash_loans_.begin() + from_year, to_year - from_year, z);
}
- [lmi-commits] [lmi] valyuta/002 7bac50c 50/65: default-initialize currency, (continued)
- [lmi-commits] [lmi] valyuta/002 7bac50c 50/65: default-initialize currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 f7f87b2 42/65: unit test: overflow, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9ea1df7 54/65: further improve preceding commit, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ba43414 61/65: Record 64-bit timings, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 fb82290 63/65: Use maximal 64-bit rather than 32-bit integer value, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 8fd00bb 34/65: rework operator*(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 bf1943b 03/65: reformat, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 7481c2b 09/65: discard--throwaway assertions, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 998fdf5 35/65: operator/(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 c105c78 29/65: Currency: implement binary operator-, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 9cf4517 46/65: c(),
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 9da6616 55/65: Round explicitly in a few more cases, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 0e8c429 12/65: rounding, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 794727e 22/65: Round when converting from double to currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 d137177 02/65: Currency, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ba6a8d1 31/65: implement currency comparisons as free functions, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 28a5e54 39/65: make data_type public, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 e9f5447 30/65: round currency to currency? huh?, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 90773f3 47/65: currency() rather than currency(0.0), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 5f00c5a 43/65: Add a commented-out idea, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a little less arcane, Greg Chicares, 2020/09/16