From 24235a29ce6cbe11b9ad27ecb8c43a3ded77010a Mon Sep 17 00:00:00 2001 From: Daniel Oberhoff Date: Thu, 23 Nov 2023 08:11:30 +0100 Subject: [PATCH] fix thread uses in platform specific code --- src/efsw/FileWatcherInotify.cpp | 2 +- src/efsw/FileWatcherWin32.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/efsw/FileWatcherInotify.cpp b/src/efsw/FileWatcherInotify.cpp index 29be12b..132959b 100644 --- a/src/efsw/FileWatcherInotify.cpp +++ b/src/efsw/FileWatcherInotify.cpp @@ -244,7 +244,7 @@ void FileWatcherInotify::removeWatch( WatchID watchid ) { void FileWatcherInotify::watch() { if ( NULL == mThread ) { - mThread = new Thread( &FileWatcherInotify::run, this ); + mThread = new Thread([this]{run();}); mThread->launch(); } } diff --git a/src/efsw/FileWatcherWin32.cpp b/src/efsw/FileWatcherWin32.cpp index 2e26eeb..25d63ed 100644 --- a/src/efsw/FileWatcherWin32.cpp +++ b/src/efsw/FileWatcherWin32.cpp @@ -112,7 +112,7 @@ void FileWatcherWin32::removeWatch( WatcherStructWin32* watch ) { void FileWatcherWin32::watch() { if ( NULL == mThread ) { - mThread = new Thread( &FileWatcherWin32::run, this ); + mThread = new Thread([this]{run();}); mThread->launch(); } }