mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Analyzers][CPP]Turn on warning 26471 (#23103)
Don't use reinterpret_cast. A cast from void* can use static_cast
This commit is contained in:
@@ -727,7 +727,7 @@ DWORD WINAPI CPowerRenameManager::s_fileOpWorkerThread(_In_ void* pv)
|
||||
{
|
||||
if (SUCCEEDED(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)))
|
||||
{
|
||||
WorkerThreadData* pwtd = reinterpret_cast<WorkerThreadData*>(pv);
|
||||
WorkerThreadData* pwtd = static_cast<WorkerThreadData*>(pv);
|
||||
if (pwtd)
|
||||
{
|
||||
bool closeUIWindowAfterRenaming = true;
|
||||
@@ -914,7 +914,7 @@ DWORD WINAPI CPowerRenameManager::s_regexWorkerThread(_In_ void* pv)
|
||||
try
|
||||
{
|
||||
winrt::check_hresult(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE));
|
||||
WorkerThreadData* pwtd = reinterpret_cast<WorkerThreadData*>(pv);
|
||||
WorkerThreadData* pwtd = static_cast<WorkerThreadData*>(pv);
|
||||
if (pwtd)
|
||||
{
|
||||
PostMessage(pwtd->hwndManager, SRM_REGEX_STARTED, GetCurrentThreadId(), 0);
|
||||
|
||||
Reference in New Issue
Block a user