diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-09 14:07:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-09 14:07:56 +0100 |
| commit | 4a317b0609fb19fd22858561beba3162d22d2cd4 (patch) | |
| tree | a6833e16954fa44614b69aab477d33d81d7f9635 /src | |
| parent | d785d323a8bf623eadc8c5d9c131211b2735022d (diff) | |
Extend operator== to cope with non-specified lines values.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vertical_position.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vertical_position.cc b/src/vertical_position.cc index 9801e4d..a680188 100644 --- a/src/vertical_position.cc +++ b/src/vertical_position.cc @@ -49,9 +49,11 @@ bool VerticalPosition::operator== (VerticalPosition const & other) const { if (proportional && reference && other.proportional && other.reference) { - return proportional.get() == other.proportional.get() && reference.get() == other.reference.get(); + return proportional == other.proportional && reference == other.reference; } else if (reference && line && lines && other.reference && other.line && other.lines) { - return line.get() == other.line.get() && lines.get() == other.lines.get() && reference.get() == other.reference.get(); + return line == other.line && lines == other.lines && reference == other.reference; + } else if (reference && line && other.reference && other.line) { + return reference == other.reference && line == other.line; } return false; |
