383 const ERRCODE DONT_EXCHANGE_DELETED =
384 "Can't exchange deleted elements of lists";
395 if (!(other_it->list))
402 if ((list->
empty ()) ||
403 (other_it->list->
empty ()) || (current == other_it->current))
408 if (!current || !other_it->current)
409 DONT_EXCHANGE_DELETED.
error (
"CLIST_ITERATOR.exchange",
ABORT,
NULL);
416 if ((next == other_it->current) ||
417 (other_it->next == current)) {
419 if ((next == other_it->current) &&
420 (other_it->next == current)) {
421 prev = next = current;
422 other_it->prev = other_it->next = other_it->current;
427 if (other_it->next == current) {
428 other_it->prev->next = current;
429 other_it->current->next = next;
430 current->next = other_it->current;
431 other_it->next = other_it->current;
435 prev->next = other_it->current;
436 current->next = other_it->next;
437 other_it->current->next = current;
439 other_it->prev = other_it->current;
444 prev->next = other_it->current;
445 current->next = other_it->next;
446 other_it->prev->next = current;
447 other_it->current->next = next;
453 if (list->last == current)
454 list->last = other_it->current;
455 if (other_it->list->last == other_it->current)
456 other_it->list->last = current;
458 if (current == cycle_pt)
459 cycle_pt = other_it->cycle_pt;
460 if (other_it->current == other_it->cycle_pt)
461 other_it->cycle_pt = cycle_pt;
465 old_current = current;
466 current = other_it->current;
467 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT