mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[Analyzers][CPP]Changes to fix warning 26493 on src/common (#23467)
* Changes to fix warning 26493 on src/common It will be multi PR change. This does not turn on the rule but fix the code under src/commom * int cast
This commit is contained in:
@@ -60,7 +60,7 @@ template<typename T>
|
||||
inline T GetWindowCreateParam(LPARAM lparam)
|
||||
{
|
||||
static_assert(sizeof(T) <= sizeof(void*));
|
||||
T data{ (T)(reinterpret_cast<CREATESTRUCT*>(lparam)->lpCreateParams) };
|
||||
T data{ static_cast <T>(reinterpret_cast<CREATESTRUCT*>(lparam)->lpCreateParams) };
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -74,5 +74,5 @@ inline void StoreWindowParam(HWND window, T data)
|
||||
template<typename T>
|
||||
inline T GetWindowParam(HWND window)
|
||||
{
|
||||
return (T)GetWindowLongPtrW(window, GWLP_USERDATA);
|
||||
return reinterpret_cast <T>(GetWindowLongPtrW(window, GWLP_USERDATA));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user