diff --git a/physical_device.cpp b/physical_device.cpp index 30df6ed..b6ee8e3 100644 --- a/physical_device.cpp +++ b/physical_device.cpp @@ -84,14 +84,9 @@ physical_device::memory_properties (void) const std::vector physical_device::queue_families (void) const { - uint32_t count = 0; - vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, nullptr); - - std::vector values (count); - vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, values.data ()); - - values.resize (count); - return values; + return error::try_array ( + vkGetPhysicalDeviceQueueFamilyProperties, native () + ); }