mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (S to V) (#23625)
Modules starting with S to V
This commit is contained in:
@@ -209,7 +209,7 @@ void Toolbar::show(std::wstring position, std::wstring monitorString)
|
||||
wc.hInstance = GetModuleHandleW(nullptr);
|
||||
wc.lpszClassName = CLASS_NAME;
|
||||
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
|
||||
wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_WINDOW);
|
||||
wc.lpfnWndProc = WindowProcessMessages;
|
||||
RegisterClassW(&wc);
|
||||
|
||||
@@ -282,7 +282,7 @@ void Toolbar::show(std::wstring position, std::wstring monitorString)
|
||||
|
||||
auto transparentColorKey = RGB(0, 0, 255);
|
||||
HBRUSH brush = CreateSolidBrush(transparentColorKey);
|
||||
SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, (LONG_PTR)brush);
|
||||
SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, reinterpret_cast<LONG_PTR>(brush));
|
||||
|
||||
SetLayeredWindowAttributes(hwnd, transparentColorKey, 0, LWA_COLORKEY);
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ bool ReencodeJPGImage(BYTE* imageBuf, const DWORD imageSize, DWORD& reencodedSiz
|
||||
auto jpgStreamMemory = static_cast<uint8_t*>(GlobalLock(streamMemoryHandle));
|
||||
std::copy(jpgStreamMemory, jpgStreamMemory + jpgStreamSize, imageBuf);
|
||||
auto unlockJpgStreamMemory = wil::scope_exit([jpgStreamMemory] { GlobalUnlock(jpgStreamMemory); });
|
||||
reencodedSize = (DWORD)jpgStreamSize;
|
||||
reencodedSize = static_cast<DWORD>(jpgStreamSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ HRESULT VideoCaptureProxyPin::Get(
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
*(GUID*)pPropData = PIN_CATEGORY_CAPTURE;
|
||||
*static_cast<GUID*>(pPropData) = PIN_CATEGORY_CAPTURE;
|
||||
|
||||
LOG("VideoCaptureProxyPin::Get SUCCESS");
|
||||
return S_OK;
|
||||
|
||||
Reference in New Issue
Block a user