From 09c2ed96adb0480a20eeaa8b03260c56e4c10956 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 17 May 2021 01:31:16 +0200 Subject: [PATCH] Fix Win32Thread trampoline since last commit In e974d1d2b1cac8c01b527c049a734f5104325163 we added the forward, and that will of course cause us to capture references instead of moved functions again. --- src/wine-host/utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wine-host/utils.h b/src/wine-host/utils.h index 0c5f40d7..f67f2836 100644 --- a/src/wine-host/utils.h +++ b/src/wine-host/utils.h @@ -80,7 +80,7 @@ class Win32Thread { * @param parameter The parameter passed to the entry point function. */ template - Win32Thread(Function&& fn, Args&&... args) + Win32Thread(Function fn, Args... args) : handle(CreateThread( nullptr, 0, @@ -92,9 +92,9 @@ class Win32Thread { // arguments to the lambda so we don't end up with dangling // references. new fu2::unique_function( - [f = std::forward(fn), - ... args = std::forward(args)]() mutable { - f(std::forward(args)...); + [f = std::move(fn), + ... args = std::move(args)]() mutable { + f(std::move(args)...); }), 0, nullptr),