[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f68e674 4/6: Improve a member function name
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f68e674 4/6: Improve a member function name |
Date: |
Wed, 8 Feb 2017 09:15:40 -0500 (EST) |
branch: master
commit f68e674f3192211b1d986325200b366df6d7f04e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Improve a member function name
The old realize_vector() actually did realize a vector of intervals,
where "intervals" is crucial but "vector" was incidental. The old
name had become especially confusing with the recent addition of
initialize_from_vector().
---
input_sequence.cpp | 16 ++++++++--------
input_sequence.hpp | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/input_sequence.cpp b/input_sequence.cpp
index 0b8fd04..199020c 100644
--- a/input_sequence.cpp
+++ b/input_sequence.cpp
@@ -771,12 +771,12 @@ InputSequence::InputSequence
// This invariant has not yet been established, whether or not the
// sequence was empty.
intervals_.back().end_duration = a_years_to_maturity;
- // This invariant is established by realize_vector(), but it does
- // no harm to repeat it here, and it would be confusing not to do
- // so in conjunction with the line above.
+ // This invariant is established by realize_intervals(), but it
+ // does no harm to repeat it here, and it would be confusing not
+ // to do so in conjunction with the line above.
intervals_.back().end_mode = e_maturity;
- realize_vector();
+ realize_intervals();
}
// Constructors taking one or two vectors as their sole arguments are
@@ -812,14 +812,14 @@ InputSequence::InputSequence(std::vector<double> const& v)
:years_to_maturity_(v.size())
{
initialize_from_vector(v);
- realize_vector();
+ realize_intervals();
}
InputSequence::InputSequence(std::vector<std::string> const& v)
:years_to_maturity_(v.size())
{
initialize_from_vector(v);
- realize_vector();
+ realize_intervals();
}
template<typename T>
@@ -912,7 +912,7 @@ InputSequence::InputSequence
}
}
- realize_vector();
+ realize_intervals();
}
InputSequence::~InputSequence() = default;
@@ -992,7 +992,7 @@ std::vector<ValueInterval> const&
InputSequence::interval_representation() const
return intervals_;
}
-void InputSequence::realize_vector()
+void InputSequence::realize_intervals()
{
// Post-construction invariants.
// Every ctor must already have established this...
diff --git a/input_sequence.hpp b/input_sequence.hpp
index 45bf337..7c6c059 100644
--- a/input_sequence.hpp
+++ b/input_sequence.hpp
@@ -288,7 +288,7 @@ class LMI_SO InputSequence
template<typename T>
void initialize_from_vector(std::vector<T> const&);
- void realize_vector();
+ void realize_intervals();
// Copies of ctor args that are identical to class SequenceParser's.
// Most of these copies are unused as this is written in 2017-01;
- [lmi-commits] [lmi] master updated (4530512 -> bd456f2), Greg Chicares, 2017/02/08
- [lmi-commits] [lmi] master c1775c9 1/6: Make one-argument ctors 'explicit', Greg Chicares, 2017/02/08
- [lmi-commits] [lmi] master f68e674 4/6: Improve a member function name,
Greg Chicares <=
- [lmi-commits] [lmi] master b0cdd09 5/6: Remove an unwanted ctor, Greg Chicares, 2017/02/08
- [lmi-commits] [lmi] master 203d1b5 2/6: Refactor, Greg Chicares, 2017/02/08
- [lmi-commits] [lmi] master bd456f2 6/6: Improve documentation, Greg Chicares, 2017/02/08
- [lmi-commits] [lmi] master 3870f3f 3/6: Refactor for reuse (VZ), Greg Chicares, 2017/02/08