Commit 6c2f3486 authored by Volker Krause's avatar Volker Krause
Browse files

Fix strict weak order violation for timeline element comparison

This seems to cause a unit test failure on FreeBSD.
parent 12d4383a
......@@ -61,14 +61,13 @@ static bool operator<(TimelineElement::RangeType lhs, TimelineElement::RangeType
bool TimelineElement::operator<(const TimelineElement &other) const
{
if (dt == other.dt) {
bool typeOrder = elementType < other.elementType;
if (rangeType == RangeEnd || other.rangeType == RangeEnd) {
if (rangeType == RangeBegin || other.rangeType == RangeBegin) {
return rangeType < other.rangeType;
}
return !typeOrder;
return elementType > other.elementType;
}
return typeOrder;
return elementType < other.elementType;
}
return dt < other.dt;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment