From 6e0a0a2692a4303d6410c24bf83e09ca47ac6759 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 May 2023 09:16:59 -0700 Subject: Make and use a bit_cast function Instead of reinterpret_casting between incompatible types --- alc/backends/wasapi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc/backends/wasapi.cpp') diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index e66656ce..ea6ecbe0 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -207,7 +207,7 @@ NameGUIDPair get_device_name_and_guid(IMMDevice *device) } PropVariant pvprop; - hr = ps->GetValue(reinterpret_cast(DEVPKEY_Device_FriendlyName), pvprop.get()); + hr = ps->GetValue(al::bit_cast(DEVPKEY_Device_FriendlyName), pvprop.get()); if(FAILED(hr)) { WARN("GetValue Device_FriendlyName failed: 0x%08lx\n", hr); @@ -222,7 +222,7 @@ NameGUIDPair get_device_name_and_guid(IMMDevice *device) } pvprop.clear(); - hr = ps->GetValue(reinterpret_cast(PKEY_AudioEndpoint_GUID), pvprop.get()); + hr = ps->GetValue(al::bit_cast(PKEY_AudioEndpoint_GUID), pvprop.get()); if(FAILED(hr)) { WARN("GetValue AudioEndpoint_GUID failed: 0x%08lx\n", hr); -- cgit v1.2.3