comapt: Add FpDeviceClass compatibility autoptr and use it

This commit is contained in:
Marco Trevisan (Treviño)
2020-01-30 14:47:12 +01:00
committed by Benjamin Berg
parent 169ca1ba77
commit cfbd5d27b7
5 changed files with 12 additions and 12 deletions

View File

@@ -104,8 +104,7 @@ main (int argc, char **argv)
for (i = 0; i < drivers->len; i++)
{
GType driver = g_array_index (drivers, GType, i);
g_autoptr(GTypeClass) type_class = g_type_class_ref (driver);
FpDeviceClass *cls = FP_DEVICE_CLASS (type_class);
g_autoptr(FpDeviceClass) cls = g_type_class_ref (driver);
if (cls->type != FP_DEVICE_TYPE_USB)
continue;