Skip to content

Commit

Permalink
feat: add forEach method to ProcessorChain
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 17, 2024
1 parent a8ae6ed commit 47082ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/juce_dsp/processors/juce_ProcessorChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ class ProcessorChain
processors);
}

/** Call the given function on each processor */
template <typename Fn>
void forEach(Fn &&fn) {
detail::forEachInTuple([&](auto &proc, auto) { fn(proc); }, processors);
}

private:
template <typename Context, typename Proc, size_t Ix>
void processOne (const Context& context, Proc& proc, std::integral_constant<size_t, Ix>) noexcept
Expand Down

0 comments on commit 47082ce

Please sign in to comment.