diff --git a/src/client/component/ui_scripting.hpp b/src/client/component/ui_scripting.hpp index bc66ec31..24a7c980 100644 --- a/src/client/component/ui_scripting.hpp +++ b/src/client/component/ui_scripting.hpp @@ -39,8 +39,7 @@ namespace ui_scripting template auto wrap_function(F f) { - std::function f_ = f; - return wrap_function(f_); + return wrap_function(std::function(f)); } template