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

Method forward

deps/tesseract/ccutil/elst2.cpp:187–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

lengthMethod · 0.45
sortMethod · 0.45
add_sortedMethod · 0.45
extract_sublistMethod · 0.45

Calls 2

errorMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected