MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / simpleCallBackSetProgress

Function simpleCallBackSetProgress

source/MRViewer/MRProgressBar.cpp:507–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507bool simpleCallBackSetProgress( float p )
508{
509 auto& instance = ProgressBarImpl::instance();
510
511 // set instance.allowCancel_ = false but write in memory only if it was true
512 bool expected = true;
513 instance.allowCancel_.compare_exchange_strong( expected, false, std::memory_order_relaxed );
514
515 setProgress( ( p + float( instance.currentTask_ - 1 ) ) / instance.taskCount_ );
516 return true; // no cancel
517}
518
519void printTimingTree( double minTimeSec )
520{

Callers

nothing calls this directly

Calls 2

instanceFunction · 0.85
setProgressFunction · 0.85

Tested by

no test coverage detected