mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Fix Win32Thread trampoline since last commit
In e974d1d2b1 we added the forward, and
that will of course cause us to capture references instead of moved
functions again.
This commit is contained in:
@@ -80,7 +80,7 @@ class Win32Thread {
|
||||
* @param parameter The parameter passed to the entry point function.
|
||||
*/
|
||||
template <typename Function, typename... Args>
|
||||
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<void()>(
|
||||
[f = std::forward<Function>(fn),
|
||||
... args = std::forward<Args>(args)]() mutable {
|
||||
f(std::forward<Args>(args)...);
|
||||
[f = std::move(fn),
|
||||
... args = std::move(args)]() mutable {
|
||||
f(std::move(args)...);
|
||||
}),
|
||||
0,
|
||||
nullptr),
|
||||
|
||||
Reference in New Issue
Block a user