| 1155 | |
| 1156 | |
| 1157 | void ClipperBase::InsertLeftEdge(Active& e) |
| 1158 | { |
| 1159 | Active* e2; |
| 1160 | if (!actives_) |
| 1161 | { |
| 1162 | e.prev_in_ael = nullptr; |
| 1163 | e.next_in_ael = nullptr; |
| 1164 | actives_ = &e; |
| 1165 | } |
| 1166 | else if (!IsValidAelOrder(*actives_, e)) |
| 1167 | { |
| 1168 | e.prev_in_ael = nullptr; |
| 1169 | e.next_in_ael = actives_; |
| 1170 | actives_->prev_in_ael = &e; |
| 1171 | actives_ = &e; |
| 1172 | } |
| 1173 | else |
| 1174 | { |
| 1175 | e2 = actives_; |
| 1176 | while (e2->next_in_ael && IsValidAelOrder(*e2->next_in_ael, e)) |
| 1177 | e2 = e2->next_in_ael; |
| 1178 | if (e2->join_with == JoinWith::Right) |
| 1179 | e2 = e2->next_in_ael; |
| 1180 | if (!e2) return; // should never happen and stops compiler warning :) |
| 1181 | e.next_in_ael = e2->next_in_ael; |
| 1182 | if (e2->next_in_ael) e2->next_in_ael->prev_in_ael = &e; |
| 1183 | e.prev_in_ael = e2; |
| 1184 | e2->next_in_ael = &e; |
| 1185 | } |
| 1186 | } |
| 1187 | |
| 1188 | |
| 1189 | void InsertRightEdge(Active& e, Active& e2) |
nothing calls this directly
no test coverage detected