mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (P) (#23604)
* Changes to fix warning 26493 on src/modules/
This commit is contained in:
@@ -420,7 +420,7 @@ BOOL GetEnumeratedFileName(__out_ecount(cchMax) PWSTR pszUniqueName, UINT cchMax
|
||||
if (!pszRest)
|
||||
{
|
||||
pszRest = PathFindExtension(pszTemplate);
|
||||
cchStem = (int)(pszRest - pszTemplate);
|
||||
cchStem = static_cast<int>(pszRest - pszTemplate);
|
||||
|
||||
hr = StringCchCopy(szFormat, ARRAYSIZE(szFormat), L" (%lu)");
|
||||
}
|
||||
@@ -428,7 +428,7 @@ BOOL GetEnumeratedFileName(__out_ecount(cchMax) PWSTR pszUniqueName, UINT cchMax
|
||||
{
|
||||
pszRest++;
|
||||
|
||||
cchStem = (int)(pszRest - pszTemplate);
|
||||
cchStem = static_cast<int>(pszRest - pszTemplate);
|
||||
|
||||
while (*pszRest && *pszRest >= L'0' && *pszRest <= L'9')
|
||||
{
|
||||
@@ -581,7 +581,7 @@ HWND CreateMsgWindow(_In_ HINSTANCE hInst, _In_ WNDPROC pfnWndProc, _In_ void* p
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.cbWndExtra = sizeof(void*);
|
||||
wc.hInstance = hInst;
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1);
|
||||
wc.lpszClassName = wndClassName;
|
||||
|
||||
RegisterClass(&wc);
|
||||
@@ -590,10 +590,10 @@ HWND CreateMsgWindow(_In_ HINSTANCE hInst, _In_ WNDPROC pfnWndProc, _In_ void* p
|
||||
0, wndClassName, nullptr, 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hInst, nullptr);
|
||||
if (hwnd)
|
||||
{
|
||||
SetWindowLongPtr(hwnd, 0, (LONG_PTR)p);
|
||||
SetWindowLongPtr(hwnd, 0, reinterpret_cast<LONG_PTR>(p));
|
||||
if (pfnWndProc)
|
||||
{
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)pfnWndProc);
|
||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(pfnWndProc));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user