From 3638a20c76d8b9b5c8e87a2ff9aa5e0acad441f5 Mon Sep 17 00:00:00 2001 From: Vladimir Olteanu Date: Fri, 13 Aug 2021 01:20:50 +0300 Subject: [PATCH] Make SdlThread constructor explicit --- Source/dthread.cpp | 2 +- Source/nthread.cpp | 2 +- Source/utils/sdl_thread.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/dthread.cpp b/Source/dthread.cpp index 0a91f85b8..ab12b5ae8 100644 --- a/Source/dthread.cpp +++ b/Source/dthread.cpp @@ -86,7 +86,7 @@ void dthread_start() DthreadRunning = true; DthreadMutex.emplace(); WorkToDo.emplace(); - Thread = { DthreadHandler }; + Thread = SdlThread { DthreadHandler }; } void DThreadCleanup() diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 5f04bee9f..6c6b7f0ee 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -181,7 +181,7 @@ void nthread_start(bool setTurnUpperBit) sgbThreadIsRunning = false; MemCrit.lock(); nthread_should_run = true; - Thread = { NthreadHandler }; + Thread = SdlThread { NthreadHandler }; } } diff --git a/Source/utils/sdl_thread.h b/Source/utils/sdl_thread.h index 4aac502c1..079ff6ee2 100644 --- a/Source/utils/sdl_thread.h +++ b/Source/utils/sdl_thread.h @@ -34,7 +34,7 @@ public: ErrSdl(); } - SdlThread(void (*handler)(void)) + explicit SdlThread(void (*handler)(void)) : SdlThread(ThreadTranslate, (void *)handler) { }