[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b99ddb5 2/3: Refactor for flexibility
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b99ddb5 2/3: Refactor for flexibility |
Date: |
Thu, 15 Feb 2018 22:18:18 -0500 (EST) |
branch: master
commit b99ddb507949e5d110e85cc336f0cab050aa20ed
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Refactor for flexibility
Moved the determination of ledger "length" a little higher, as will be
required by the next commit.
---
ledger_evaluator.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index 76e93fc..649b9a7 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -563,6 +563,12 @@ ledger_evaluator Ledger::make_evaluator() const
scalar_map scalars = ledger_invariant_->AllScalars;
string_map strings = ledger_invariant_->Strings;
+// GetMaxLength() is max *composite* length.
+// int max_length = GetMaxLength();
+ double MaxDuration = ledger_invariant_->EndtAge - ledger_invariant_->Age;
+ scalars["MaxDuration"] = &MaxDuration;
+ int max_duration = static_cast<int>(MaxDuration);
+
// Now we add the stuff that wasn't in the invariant
// ledger's class's maps (indexable by name). Because we're
// working with maps of pointers, we need pointers here.
@@ -582,12 +588,6 @@ ledger_evaluator Ledger::make_evaluator() const
vectors["IrrCsv_Current" ] = &ledger_invariant_->IrrCsvCurrInput;
vectors["IrrDb_Current" ] = &ledger_invariant_->IrrDbCurrInput ;
-// GetMaxLength() is max *composite* length.
-// int max_length = GetMaxLength();
- double MaxDuration = ledger_invariant_->EndtAge - ledger_invariant_->Age;
- scalars["MaxDuration"] = &MaxDuration;
- int max_duration = static_cast<int>(MaxDuration);
-
std::vector<double> PolicyYear;
std::vector<double> AttainedAge;