Lines Matching refs:MergeTo
116 iterator MergeTo = std::next(I); in extendSegmentEndTo() local
117 for (; MergeTo != segments().end() && NewEnd >= MergeTo->end; ++MergeTo) in extendSegmentEndTo()
118 assert(MergeTo->valno == ValNo && "Cannot merge with differing values!"); in extendSegmentEndTo()
121 S->end = std::max(NewEnd, std::prev(MergeTo)->end); in extendSegmentEndTo()
125 if (MergeTo != segments().end() && MergeTo->start <= I->end && in extendSegmentEndTo()
126 MergeTo->valno == ValNo) { in extendSegmentEndTo()
127 S->end = MergeTo->end; in extendSegmentEndTo()
128 ++MergeTo; in extendSegmentEndTo()
132 segments().erase(std::next(I), MergeTo); in extendSegmentEndTo()
144 iterator MergeTo = I; in extendSegmentStartTo() local
146 if (MergeTo == segments().begin()) { in extendSegmentStartTo()
148 segments().erase(MergeTo, I); in extendSegmentStartTo()
151 assert(MergeTo->valno == ValNo && "Cannot merge with differing values!"); in extendSegmentStartTo()
152 --MergeTo; in extendSegmentStartTo()
153 } while (NewStart <= MergeTo->start); in extendSegmentStartTo()
157 if (MergeTo->end >= NewStart && MergeTo->valno == ValNo) { in extendSegmentStartTo()
158 segmentAt(MergeTo)->end = S->end; in extendSegmentStartTo()
161 ++MergeTo; in extendSegmentStartTo()
162 Segment *MergeToSeg = segmentAt(MergeTo); in extendSegmentStartTo()
167 segments().erase(std::next(MergeTo), std::next(I)); in extendSegmentStartTo()
168 return MergeTo; in extendSegmentStartTo()