From 4a317b0609fb19fd22858561beba3162d22d2cd4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Jun 2016 14:07:56 +0100 Subject: Extend operator== to cope with non-specified lines values. --- src/vertical_position.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3