Skip to content

Commit 6ac78b8

Browse files
committed
Cast GWLP_USERDATA to ShortcutManagerImpl
Use the concrete ShortcutManagerImpl type when retrieving the pointer from GWLP_USERDATA in the window procedure. This replaces the previous reinterpret_cast to an ambiguous Impl type and wraps the long cast onto a new line for readability and to avoid potential type/name errors.
1 parent a1dd7d4 commit 6ac78b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/platform/windows/shortcut_manager_windows.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ class ShortcutManagerImpl final : public ShortcutManager::Impl {
223223
return DefWindowProc(hwnd, msg, wparam, lparam);
224224
}
225225

226-
auto* self = reinterpret_cast<Impl*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
226+
auto* self =
227+
reinterpret_cast<ShortcutManagerImpl*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
227228
if (!self) {
228229
return DefWindowProc(hwnd, msg, wparam, lparam);
229230
}

0 commit comments

Comments
 (0)