306 const ERRCODE DONT_EXCHANGE_DELETED =
307 "Can't exchange deleted elements of lists";
316 if (!(other_it->list))
323 if ((list->
empty ()) ||
324 (other_it->list->
empty ()) || (current == other_it->current))
329 if (!current || !other_it->current)
330 DONT_EXCHANGE_DELETED.
error (
"ELIST2_ITERATOR.exchange",
ABORT,
nullptr);
337 if ((next == other_it->current) ||
338 (other_it->next == current)) {
340 if ((next == other_it->current) &&
341 (other_it->next == current)) {
342 prev = next = current;
343 other_it->prev = other_it->next = other_it->current;
348 if (other_it->next == current) {
349 other_it->prev->next = current;
350 other_it->current->next = next;
351 other_it->current->prev = current;
352 current->next = other_it->current;
353 current->prev = other_it->prev;
354 next->prev = other_it->current;
356 other_it->next = other_it->current;
360 prev->next = other_it->current;
361 current->next = other_it->next;
362 current->prev = other_it->current;
363 other_it->current->next = current;
364 other_it->current->prev = prev;
365 other_it->next->prev = current;
368 other_it->prev = other_it->current;
373 prev->next = other_it->current;
374 current->next = other_it->next;
375 current->prev = other_it->prev;
376 next->prev = other_it->current;
377 other_it->prev->next = current;
378 other_it->current->next = next;
379 other_it->current->prev = prev;
380 other_it->next->prev = current;
386 if (list->last == current)
387 list->last = other_it->current;
388 if (other_it->list->last == other_it->current)
389 other_it->list->last = current;
391 if (current == cycle_pt)
392 cycle_pt = other_it->cycle_pt;
393 if (other_it->current == other_it->cycle_pt)
394 other_it->cycle_pt = cycle_pt;
398 old_current = current;
399 current = other_it->current;
400 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const