293 constexpr
ERRCODE DONT_EXCHANGE_DELETED(
294 "Can't exchange deleted elements of lists");
303 if (!(other_it->list))
310 if ((list->
empty ()) ||
311 (other_it->list->
empty ()) || (current == other_it->current))
316 if (!current || !other_it->current)
317 DONT_EXCHANGE_DELETED.error (
"ELIST_ITERATOR.exchange",
ABORT,
nullptr);
324 if ((next == other_it->current) ||
325 (other_it->next == current)) {
327 if ((next == other_it->current) &&
328 (other_it->next == current)) {
329 prev = next = current;
330 other_it->prev = other_it->next = other_it->current;
335 if (other_it->next == current) {
336 other_it->prev->next = current;
337 other_it->current->next = next;
338 current->next = other_it->current;
339 other_it->next = other_it->current;
343 prev->next = other_it->current;
344 current->next = other_it->next;
345 other_it->current->next = current;
347 other_it->prev = other_it->current;
352 prev->next = other_it->current;
353 current->next = other_it->next;
354 other_it->prev->next = current;
355 other_it->current->next = next;
361 if (list->last == current)
362 list->last = other_it->current;
363 if (other_it->list->last == other_it->current)
364 other_it->list->last = current;
366 if (current == cycle_pt)
367 cycle_pt = other_it->cycle_pt;
368 if (other_it->current == other_it->cycle_pt)
369 other_it->cycle_pt = cycle_pt;
373 old_current = current;
374 current = other_it->current;
375 other_it->current = old_current;
constexpr ERRCODE NO_LIST("Iterator not set to a list")
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
constexpr ERRCODE BAD_PARAMETER("List parameter error")