Skip to content

Commit 81c2b68

Browse files
committed
C cast to C++ cast
1 parent 43e0860 commit 81c2b68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RawInputViewer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,15 @@ class MainWindow final : public Window
338338
[[nodiscard]] std::optional<LRESULT> onInput(HWND, UINT, WPARAM wParam, LPARAM lParam)
339339
{
340340
UINT size = 0;
341-
if (GetRawInputData((HRAWINPUT)lParam, RID_INPUT, nullptr, &size, sizeof(RAWINPUTHEADER)) == static_cast<UINT>(-1))
341+
if (GetRawInputData(reinterpret_cast<HRAWINPUT>(lParam), RID_INPUT, nullptr, &size, sizeof(RAWINPUTHEADER)) == static_cast<UINT>(-1))
342342
{
343343
THROW_LAST_SYSTEM_ERROR();
344344
}
345345

346346
TempBuffer<void> buffer(size);
347347
RAWINPUT* raw = static_cast<RAWINPUT*>(buffer.data());
348348

349-
if (GetRawInputData((HRAWINPUT)lParam, RID_INPUT, raw, &size, sizeof(RAWINPUTHEADER)) == static_cast<UINT>(-1))
349+
if (GetRawInputData(reinterpret_cast<HRAWINPUT>(lParam), RID_INPUT, raw, &size, sizeof(RAWINPUTHEADER)) == static_cast<UINT>(-1))
350350
{
351351
THROW_LAST_SYSTEM_ERROR();
352352
}

0 commit comments

Comments
 (0)