297 const ERRCODE DONT_EXCHANGE_DELETED =
298 "Can't exchange deleted elements of lists";
307 if (!(other_it->list))
314 if ((list->
empty ()) ||
315 (other_it->list->
empty ()) || (current == other_it->current))
320 if (!current || !other_it->current)
321 DONT_EXCHANGE_DELETED.
error (
"ELIST_ITERATOR.exchange",
ABORT, NULL);
328 if ((next == other_it->current) ||
329 (other_it->next == current)) {
331 if ((next == other_it->current) &&
332 (other_it->next == current)) {
333 prev = next = current;
334 other_it->prev = other_it->next = other_it->current;
339 if (other_it->next == current) {
340 other_it->prev->next = current;
341 other_it->current->next = next;
342 current->next = other_it->current;
343 other_it->next = other_it->current;
347 prev->next = other_it->current;
348 current->next = other_it->next;
349 other_it->current->next = current;
351 other_it->prev = other_it->current;
356 prev->next = other_it->current;
357 current->next = other_it->next;
358 other_it->prev->next = current;
359 other_it->current->next = next;
365 if (list->last == current)
366 list->last = other_it->current;
367 if (other_it->list->last == other_it->current)
368 other_it->list->last = current;
370 if (current == cycle_pt)
371 cycle_pt = other_it->cycle_pt;
372 if (other_it->current == other_it->cycle_pt)
373 other_it->cycle_pt = cycle_pt;
377 old_current = current;
378 current = other_it->current;
379 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const