1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

feat: add forEach method to ProcessorChain

This commit is contained in:
Amin Yahyaabadi 2024-02-16 22:08:20 -08:00
parent a8ae6edda6
commit 47082cecd5
No known key found for this signature in database
GPG key ID: F52AF77F636088F0

View file

@ -96,6 +96,12 @@ public:
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