346 const ERRCODE DONT_EXCHANGE_DELETED =
347 "Can't exchange deleted elements of lists";
356 if (!(other_it->list))
363 if ((list->
empty ()) ||
364 (other_it->list->
empty ()) || (current == other_it->current))
369 if (!current || !other_it->current)
370 DONT_EXCHANGE_DELETED.
error (
"CLIST_ITERATOR.exchange",
ABORT, NULL);
377 if ((next == other_it->current) ||
378 (other_it->next == current)) {
380 if ((next == other_it->current) &&
381 (other_it->next == current)) {
382 prev = next = current;
383 other_it->prev = other_it->next = other_it->current;
388 if (other_it->next == current) {
389 other_it->prev->next = current;
390 other_it->current->next = next;
391 current->next = other_it->current;
392 other_it->next = other_it->current;
396 prev->next = other_it->current;
397 current->next = other_it->next;
398 other_it->current->next = current;
400 other_it->prev = other_it->current;
405 prev->next = other_it->current;
406 current->next = other_it->next;
407 other_it->prev->next = current;
408 other_it->current->next = next;
414 if (list->last == current)
415 list->last = other_it->current;
416 if (other_it->list->last == other_it->current)
417 other_it->list->last = current;
419 if (current == cycle_pt)
420 cycle_pt = other_it->cycle_pt;
421 if (other_it->current == other_it->cycle_pt)
422 other_it->cycle_pt = cycle_pt;
426 old_current = current;
427 current = other_it->current;
428 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const