384 const ERRCODE DONT_EXCHANGE_DELETED =
385 "Can't exchange deleted elements of lists";
396 if (!(other_it->list))
403 if ((list->
empty ()) ||
404 (other_it->list->
empty ()) || (current == other_it->current))
409 if (!current || !other_it->current)
410 DONT_EXCHANGE_DELETED.
error (
"CLIST_ITERATOR.exchange",
ABORT,
NULL);
417 if ((next == other_it->current) ||
418 (other_it->next == current)) {
420 if ((next == other_it->current) &&
421 (other_it->next == current)) {
422 prev = next = current;
423 other_it->prev = other_it->next = other_it->current;
428 if (other_it->next == current) {
429 other_it->prev->next = current;
430 other_it->current->next = next;
431 current->next = other_it->current;
432 other_it->next = other_it->current;
436 prev->next = other_it->current;
437 current->next = other_it->next;
438 other_it->current->next = current;
440 other_it->prev = other_it->current;
445 prev->next = other_it->current;
446 current->next = other_it->next;
447 other_it->prev->next = current;
448 other_it->current->next = next;
454 if (list->last == current)
455 list->last = other_it->current;
456 if (other_it->list->last == other_it->current)
457 other_it->list->last = current;
459 if (current == cycle_pt)
460 cycle_pt = other_it->cycle_pt;
461 if (other_it->current == other_it->cycle_pt)
462 other_it->cycle_pt = cycle_pt;
466 old_current = current;
467 current = other_it->current;
468 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
const ERRCODE NULL_OBJECT
void error(const char *caller, TessErrorLogCode action, const char *format,...) const