MCPcopy Create free account
hub / github.com/creatale/node-dv / forward

Method forward

deps/tesseract/ccutil/elst.cpp:194–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 **********************************************************************/
193
194ELIST_LINK *ELIST_ITERATOR::forward() {
195 #ifndef NDEBUG
196 if (!list)
197 NO_LIST.error ("ELIST_ITERATOR::forward", ABORT, NULL);
198 #endif
199 if (list->empty ())
200 return NULL;
201
202 if (current) { //not removed so
203 //set previous
204 prev = current;
205 started_cycling = TRUE;
206 // In case next is deleted by another iterator, get next from current.
207 current = current->next;
208 } else {
209 if (ex_current_was_cycle_pt)
210 cycle_pt = next;
211 current = next;
212 }
213 next = current->next;
214
215 #ifndef NDEBUG
216 if (!current)
217 NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, NULL);
218 if (!next)
219 NULL_NEXT.error ("ELIST_ITERATOR::forward", ABORT,
220 "This is: %p Current is: %p", this, current);
221 #endif
222 return current;
223}
224
225/***********************************************************************
226 * ELIST_ITERATOR::data_relative

Callers 4

lengthMethod · 0.45
sortMethod · 0.45
add_sorted_and_findMethod · 0.45
extract_sublistMethod · 0.45

Calls 2

errorMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected