diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2020-07-01 07:00:52 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2020-07-01 07:00:52 +0200 |
commit | a60226b43adfc1d1343ffa1063e537c1e230db39 (patch) | |
tree | 02f29bee1165d961fc3b36bc44c17e4a8570cdc0 /compat/thread-name.cpp | |
parent | e3bcf63d15104c1ff547e3df3104c6fadcce4df6 (diff) |
compat/thread-name: fix __try
Diffstat (limited to 'compat/thread-name.cpp')
-rw-r--r-- | compat/thread-name.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/compat/thread-name.cpp b/compat/thread-name.cpp index 504c6f19..08a7d628 100644 --- a/compat/thread-name.cpp +++ b/compat/thread-name.cpp @@ -20,12 +20,9 @@ struct THREADNAME_INFO }; static inline -void set_curthread_name_old(const QString& name_) +void set_curthread_name_old_(const char* name) { - QByteArray str = name_.toLocal8Bit(); - const char* name = str.constData(); HANDLE curthread = GetCurrentThread(); - THREADNAME_INFO info; // NOLINT(cppcoreguidelines-pro-type-member-init) info.dwType = 0x1000; info.szName = name; @@ -41,6 +38,15 @@ void set_curthread_name_old(const QString& name_) { } } + +static inline +void set_curthread_name_old(const QString& name_) +{ + QByteArray str = name_.toLocal8Bit(); + const char* name = str.constData(); + + set_curthread_name_old_(name); +} #else static inline void set_curthread_name_old(const QString&) {} |