Build fix for Clang.

This commit is contained in:
Gunnar Beutner 2013-03-14 08:18:19 +01:00
parent d99671ba0e
commit 58f0c863a6
1 changed files with 7 additions and 6 deletions

View File

@ -135,13 +135,14 @@ void TimePeriod::RemoveSegment(double begin, double end)
continue;
}
/* Create a new segment and adjust its begin/end timestamps
* so as to not overlap with the specified range. */
Dictionary::Ptr newSegment = boost::make_shared<Dictionary>();
newSegment->Set("begin", (segment->Get("begin") < end) ? end : segment->Get("begin"));
newSegment->Set("end", (segment->Get("end") > begin) ? begin : segment->Get("end"));
/* Adjust the begin/end timestamps so as to not overlap with the specified range. */
if (segment->Get("begin") < end)
segment->Set("begin", end);
newSegments->Add(newSegment);
if (segment->Get("end") > begin)
segment->Set("end", begin);
newSegments->Add(segment);
}
m_Segments = newSegments;