From c5443e1b3912cd1b7091db9814cf65a429d951e7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 30 Apr 2019 03:46:09 +0200 Subject: compat/thread-name: use SetThreadDescription on mingw-w64 --- compat/thread-name.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/compat/thread-name.cpp b/compat/thread-name.cpp index da9aacd5..d12a59ca 100644 --- a/compat/thread-name.cpp +++ b/compat/thread-name.cpp @@ -8,8 +8,9 @@ namespace portable { -#if defined _MSC_VER +#ifdef _WIN32 +#ifdef _MSC_VER struct THREADNAME_INFO { DWORD dwType; // must be 0x1000 @@ -40,6 +41,11 @@ void set_curthread_name_old(const QString& name_) { } } +#else + +static inline void set_curthread_name_old(const QString&) {} + +#endif void set_curthread_name(const QString& name) { @@ -58,13 +64,6 @@ void set_curthread_name(const QString& name) } } -#elif defined _WIN32 - -void set_curthread_name(const QString& name) -{ - (void)name; -} - #else void set_curthread_name(const QString& name) -- cgit v1.2.3