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

Fix NullCheckedInvocation::invoke() std::function signature to allow non-forwarding references

This commit is contained in:
ed 2021-12-06 10:23:30 +00:00
parent a71bda9adb
commit fcb4a8adb3

View file

@ -34,7 +34,7 @@ namespace juce
struct NullCheckedInvocation
{
template <typename... Signature, typename... Args>
static void invoke (std::function<Signature...>&& fn, Args&&... args)
static void invoke (const std::function<Signature...>& fn, Args&&... args)
{
if (fn != nullptr)
fn (std::forward<Args> (args)...);