diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2017-06-07 20:33:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-07 20:33:54 -0700 |
| commit | b11d722eeda67bc498f7bf727649fb4ae4e5f997 (patch) | |
| tree | 597b9596564442ac1c125f5f7332ffc6ec97ce03 /Source/Core/Common/Thread.cpp | |
| parent | e6aa118f2111351c7fb38a611f3523793927addb (diff) | |
| parent | fd166032abec349b9fae7240830133bf7e0c77b5 (diff) | |
Merge pull request #5572 from shuffle2/msvc-w4
msvc: use /W4 (and fixes to make it work)
Diffstat (limited to 'Source/Core/Common/Thread.cpp')
| -rw-r--r-- | Source/Core/Common/Thread.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp index 190653ee31..fa81314795 100644 --- a/Source/Core/Common/Thread.cpp +++ b/Source/Core/Common/Thread.cpp @@ -62,11 +62,8 @@ void SwitchCurrentThread() } // Sets the debugger-visible name of the current thread. -// Uses undocumented (actually, it is now documented) trick. -// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtsksettingthreadname.asp - -// This is implemented much nicer in upcoming msvc++, see: -// http://msdn.microsoft.com/en-us/library/xcb2z8hs(VS.100).aspx +// Uses trick documented in: +// https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code void SetCurrentThreadName(const char* szThreadName) { static const DWORD MS_VC_EXCEPTION = 0x406D1388; @@ -83,7 +80,7 @@ void SetCurrentThreadName(const char* szThreadName) info.dwType = 0x1000; info.szName = szThreadName; - info.dwThreadID = -1; // dwThreadID; + info.dwThreadID = static_cast<DWORD>(-1); info.dwFlags = 0; __try |
