mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +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:
@@ -24,7 +24,7 @@ protected:
|
||||
if (!thisRef && (message == WM_CREATE))
|
||||
{
|
||||
const auto createStruct = reinterpret_cast<LPCREATESTRUCT>(lparam);
|
||||
thisRef = reinterpret_cast<AlwaysOnTop*>(createStruct->lpCreateParams);
|
||||
thisRef = static_cast<AlwaysOnTop*>(createStruct->lpCreateParams);
|
||||
SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(thisRef));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ protected:
|
||||
if ((thisRef == nullptr) && (message == WM_CREATE))
|
||||
{
|
||||
auto createStruct = reinterpret_cast<LPCREATESTRUCT>(lparam);
|
||||
thisRef = reinterpret_cast<WindowBorder*>(createStruct->lpCreateParams);
|
||||
thisRef = static_cast<WindowBorder*>(createStruct->lpCreateParams);
|
||||
SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(thisRef));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user