[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b56fb86 6/6: Canonicalize a near-canonical re
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b56fb86 6/6: Canonicalize a near-canonical result |
Date: |
Tue, 28 Feb 2017 22:02:59 -0500 (EST) |
branch: master
commit b56fb860159549728cedadf4d072e9bee939e383
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Canonicalize a near-canonical result
Prevent the GUI from transmogrifying simple sequences in the way that
InputSequence::canonical_form() did before the 20170301T0145 commit.
---
input_sequence_entry.cpp | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index f7ebc79..b9bdee3 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -533,7 +533,24 @@ std::string InputSequenceEditor::sequence_string()
}
}
- return s;
+ // This code largely duplicates InputSequence::canonical_form(),
+ // but, unfortunately, the two cannot readily be combined. (It
+ // would be possible to produce a std::vector<ValueInterval> here
+ // and canonicalize it, but that would not be simpler.) Yet it
+ // makes no sense to maintain the two in parallel, so just
+ // recanonicalize the result to simplify it.
+ return InputSequence
+ (s
+ ,input_.years_to_maturity()
+ ,input_.issue_age ()
+ ,input_.retirement_age ()
+ ,input_.inforce_year ()
+ ,input_.effective_year ()
+ ,keywords_
+ ,keywords_only_
+ ,default_keyword_
+ ).canonical_form()
+ ;
}
void SizeWinForText(wxControl* win, wxString const& text)
- [lmi-commits] [lmi] master updated (86aacf1 -> b56fb86), Greg Chicares, 2017/02/28
- [lmi-commits] [lmi] master 2afd2fe 3/6: Improve concinnity, Greg Chicares, 2017/02/28
- [lmi-commits] [lmi] master 00c737d 1/6: Ensure that parser issues a diagnostic when insanity detected, Greg Chicares, 2017/02/28
- [lmi-commits] [lmi] master 4b0c2ee 4/6: Remove an unreachable statement, Greg Chicares, 2017/02/28
- [lmi-commits] [lmi] master b56fb86 6/6: Canonicalize a near-canonical result,
Greg Chicares <=
- [lmi-commits] [lmi] master 0d3c75a 5/6: Improve readability, Greg Chicares, 2017/02/28
- [lmi-commits] [lmi] master 3de3cf5 2/6: s12n(c14n), Greg Chicares, 2017/02/28