347 const ERRCODE DONT_EXCHANGE_DELETED =
348 "Can't exchange deleted elements of lists";
357 if (!(other_it->list))
364 if ((list->
empty ()) ||
365 (other_it->list->
empty ()) || (current == other_it->current))
370 if (!current || !other_it->current)
371 DONT_EXCHANGE_DELETED.
error (
"CLIST_ITERATOR.exchange",
ABORT,
nullptr);
378 if ((next == other_it->current) ||
379 (other_it->next == current)) {
381 if ((next == other_it->current) &&
382 (other_it->next == current)) {
383 prev = next = current;
384 other_it->prev = other_it->next = other_it->current;
389 if (other_it->next == current) {
390 other_it->prev->next = current;
391 other_it->current->next = next;
392 current->next = other_it->current;
393 other_it->next = other_it->current;
397 prev->next = other_it->current;
398 current->next = other_it->next;
399 other_it->current->next = current;
401 other_it->prev = other_it->current;
406 prev->next = other_it->current;
407 current->next = other_it->next;
408 other_it->prev->next = current;
409 other_it->current->next = next;
415 if (list->last == current)
416 list->last = other_it->current;
417 if (other_it->list->last == other_it->current)
418 other_it->list->last = current;
420 if (current == cycle_pt)
421 cycle_pt = other_it->cycle_pt;
422 if (other_it->current == other_it->cycle_pt)
423 other_it->cycle_pt = cycle_pt;
427 old_current = current;
428 current = other_it->current;
429 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const