323 const ERRCODE DONT_EXCHANGE_DELETED =
324 "Can't exchange deleted elements of lists";
335 if (!(other_it->list))
342 if ((list->
empty ()) ||
343 (other_it->list->
empty ()) || (current == other_it->current))
348 if (!current || !other_it->current)
349 DONT_EXCHANGE_DELETED.
error (
"ELIST_ITERATOR.exchange",
ABORT,
NULL);
356 if ((next == other_it->current) ||
357 (other_it->next == current)) {
359 if ((next == other_it->current) &&
360 (other_it->next == current)) {
361 prev = next = current;
362 other_it->prev = other_it->next = other_it->current;
367 if (other_it->next == current) {
368 other_it->prev->next = current;
369 other_it->current->next = next;
370 current->next = other_it->current;
371 other_it->next = other_it->current;
375 prev->next = other_it->current;
376 current->next = other_it->next;
377 other_it->current->next = current;
379 other_it->prev = other_it->current;
384 prev->next = other_it->current;
385 current->next = other_it->next;
386 other_it->prev->next = current;
387 other_it->current->next = next;
393 if (list->last == current)
394 list->last = other_it->current;
395 if (other_it->list->last == other_it->current)
396 other_it->list->last = current;
398 if (current == cycle_pt)
399 cycle_pt = other_it->cycle_pt;
400 if (other_it->current == other_it->cycle_pt)
401 other_it->cycle_pt = cycle_pt;
405 old_current = current;
406 current = other_it->current;
407 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT