spa: libcamera: use C++ style casts

This commit is contained in:
Barnabás Pőcze 2025-07-12 19:25:19 +02:00 committed by Wim Taymans
parent bb8223bff1
commit 4fa11619a2
3 changed files with 15 additions and 19 deletions

View file

@ -234,13 +234,11 @@ const struct spa_device_methods impl_device = {
int impl_get_interface(struct spa_handle *handle, const char *type, void **interface)
{
struct impl *impl;
auto *impl = reinterpret_cast<struct impl *>(handle);
spa_return_val_if_fail(handle != NULL, -EINVAL);
spa_return_val_if_fail(interface != NULL, -EINVAL);
impl = (struct impl *) handle;
if (spa_streq(type, SPA_TYPE_INTERFACE_Device))
*interface = &impl->device;
else