294 const ERRCODE DONT_EXCHANGE_DELETED =
295 "Can't exchange deleted elements of lists";
304 if (!(other_it->list))
311 if ((list->
empty ()) ||
312 (other_it->list->
empty ()) || (current == other_it->current))
317 if (!current || !other_it->current)
318 DONT_EXCHANGE_DELETED.
error (
"ELIST_ITERATOR.exchange",
ABORT,
nullptr);
325 if ((next == other_it->current) ||
326 (other_it->next == current)) {
328 if ((next == other_it->current) &&
329 (other_it->next == current)) {
330 prev = next = current;
331 other_it->prev = other_it->next = other_it->current;
336 if (other_it->next == current) {
337 other_it->prev->next = current;
338 other_it->current->next = next;
339 current->next = other_it->current;
340 other_it->next = other_it->current;
344 prev->next = other_it->current;
345 current->next = other_it->next;
346 other_it->current->next = current;
348 other_it->prev = other_it->current;
353 prev->next = other_it->current;
354 current->next = other_it->next;
355 other_it->prev->next = current;
356 other_it->current->next = next;
362 if (list->last == current)
363 list->last = other_it->current;
364 if (other_it->list->last == other_it->current)
365 other_it->list->last = current;
367 if (current == cycle_pt)
368 cycle_pt = other_it->cycle_pt;
369 if (other_it->current == other_it->cycle_pt)
370 other_it->cycle_pt = cycle_pt;
374 old_current = current;
375 current = other_it->current;
376 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const