aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-23 01:42:22 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-23 01:42:22 +0200
commit74b9361ccc77bcbb6b8188ad5914d6b26530d26a (patch)
treedcae529eafee0666a799fd3377ee66e81ad41e26
parent01124be71c818a6ac39f55d1a0eed6235864855f (diff)
downloadEpisodeBrowser-74b9361ccc77bcbb6b8188ad5914d6b26530d26a.tar.gz
Use thread_local instead of __thread.
-rw-r--r--c/win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/c/win.cpp b/c/win.cpp
index a09b19b..e8c429d 100644
--- a/c/win.cpp
+++ b/c/win.cpp
@@ -18,8 +18,8 @@ void WithNextWindow(void (*proc)(HWND))
* that static storage must be used, as SetWindowHookEx cannot
* accept a capturing lambda as the hook procedure. */
- static __thread auto procNext = proc;
- static __thread HHOOK hHook = Require(SetWindowsHookEx(WH_CBT, [](const int nCode,
+ static thread_local auto procNext = proc;
+ static thread_local HHOOK hHook = Require(SetWindowsHookEx(WH_CBT, [](const int nCode,
const WPARAM wParam, const LPARAM lParam) -> LRESULT CALLBACK
{
if (nCode == HCBT_CREATEWND) {
@@ -42,9 +42,9 @@ static void CenterNextWindow(HWND hWnd)
* is delayed until the new window is activated. This
* complicates the code somewhat. */
- static __thread HWND hWndParent;
- static __thread HWND hWndNext;
- static __thread HHOOK hHook;
+ static thread_local HWND hWndParent;
+ static thread_local HWND hWndNext;
+ static thread_local HHOOK hHook;
hWndParent = hWnd;
hWndNext = nullptr;