MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / move_next

Method move_next

benchmarks/dlib/queue/queue_kernel_1.h:471–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469 typename mem_manager
470 >
471 bool queue_kernel_1<T,mem_manager>::
472 move_next (
473 ) const
474 {
475 if (at_start_)
476 {
477 at_start_ = false;
478 // if the queue is empty then there is nothing to do
479 if (queue_size == 0)
480 {
481 return false;
482 }
483 else
484 {
485 current_element = out;
486 return true;
487 }
488 }
489 else
490 {
491 // if we are at the last element then the enumeration has finished
492 if (current_element == in || current_element == 0)
493 {
494 current_element = 0;
495 return false;
496 }
497 else
498 {
499 current_element = current_element->last;
500 return true;
501 }
502 }
503 }
504
505// ----------------------------------------------------------------------------------------
506// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected