[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6180] Resolve two marked defects: improve initialization
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6180] Resolve two marked defects: improve initialization and documentation |
Date: |
Sat, 02 May 2015 00:36:25 +0000 |
Revision: 6180
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6180
Author: chicares
Date: 2015-05-02 00:36:25 +0000 (Sat, 02 May 2015)
Log Message:
-----------
Resolve two marked defects: improve initialization and documentation
Modified Paths:
--------------
lmi/trunk/ihs_acctval.cpp
lmi/trunk/ihs_avmly.cpp
Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp 2015-05-02 00:25:44 UTC (rev 6179)
+++ lmi/trunk/ihs_acctval.cpp 2015-05-02 00:36:25 UTC (rev 6180)
@@ -932,8 +932,12 @@
DacTaxRsv = 0.0;
- RequestedLoan = Outlay_->new_cash_loans()[Year];
- ActualLoan = RequestedLoan; // TODO ?? Why not zero?
+ RequestedLoan = Outlay_->new_cash_loans()[Year];
+ // ActualLoan is set in TxTakeLoan() and TxLoanRepay(). A local
+ // variable in each function might have sufficed, except that this
+ // quantity is used in the optional monthly detail report. Its
+ // value depends on the maximum loan, so it cannot be known here.
+ ActualLoan = 0.0;
GrossPmts .assign(12, 0.0);
EeGrossPmts .assign(12, 0.0);
Modified: lmi/trunk/ihs_avmly.cpp
===================================================================
--- lmi/trunk/ihs_avmly.cpp 2015-05-02 00:25:44 UTC (rev 6179)
+++ lmi/trunk/ihs_avmly.cpp 2015-05-02 00:36:25 UTC (rev 6180)
@@ -1526,9 +1526,6 @@
return;
}
-// TODO ?? ActualLoan should be eliminated. It's used only in two functions,
-// one that takes a loan, and one that repays a loan.
-
// TODO ?? This idiom seems too cute. And it can return -0.0 .
// Maximum repayment is total debt.
ActualLoan = -std::min(-RequestedLoan, RegLnBal);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6180] Resolve two marked defects: improve initialization and documentation,
Greg Chicares <=