mirror of https://github.com/Icinga/icinga2.git
Build fix for Clang.
This commit is contained in:
parent
d99671ba0e
commit
58f0c863a6
|
@ -135,13 +135,14 @@ void TimePeriod::RemoveSegment(double begin, double end)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new segment and adjust its begin/end timestamps
|
/* Adjust the begin/end timestamps so as to not overlap with the specified range. */
|
||||||
* so as to not overlap with the specified range. */
|
if (segment->Get("begin") < end)
|
||||||
Dictionary::Ptr newSegment = boost::make_shared<Dictionary>();
|
segment->Set("begin", end);
|
||||||
newSegment->Set("begin", (segment->Get("begin") < end) ? end : segment->Get("begin"));
|
|
||||||
newSegment->Set("end", (segment->Get("end") > begin) ? begin : segment->Get("end"));
|
|
||||||
|
|
||||||
newSegments->Add(newSegment);
|
if (segment->Get("end") > begin)
|
||||||
|
segment->Set("end", begin);
|
||||||
|
|
||||||
|
newSegments->Add(segment);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Segments = newSegments;
|
m_Segments = newSegments;
|
||||||
|
|
Loading…
Reference in New Issue