MCPcopy Create free account
hub / github.com/audacity/audacity / SplitProgress

Function SplitProgress

libraries/lib-basic-ui/BasicUI.h:343–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341 */
342template <typename ItType, typename FnType>
343void SplitProgress(
344 ItType first, ItType last, FnType action, ProgressReporter parent)
345{
346 auto count = 0;
347 const auto numIters = std::distance(first, last);
348 if (numIters == 0)
349 return;
350 const ProgressReporter child =
351 parent ? [&](double progress) { parent((count + progress) / numIters); } :
352 ProgressReporter {};
353
354 for (; first != last; ++first)
355 {
356 action(*first, child);
357 ++count;
358 }
359}
360
361//! Display a dialog with radio buttons.
362/*!

Callers 4

EffectOutputTracksMethod · 0.85
EditByLabelFunction · 0.85
OnSilenceFunction · 0.85
OnJoinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected