physical_device: prefer try_array over manual queries
This commit is contained in:
parent
7239fb26bf
commit
8726ca81cb
@ -84,14 +84,9 @@ physical_device::memory_properties (void) const
|
||||
std::vector<VkQueueFamilyProperties>
|
||||
physical_device::queue_families (void) const
|
||||
{
|
||||
uint32_t count = 0;
|
||||
vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, nullptr);
|
||||
|
||||
std::vector<VkQueueFamilyProperties> values (count);
|
||||
vkGetPhysicalDeviceQueueFamilyProperties (native (), &count, values.data ());
|
||||
|
||||
values.resize (count);
|
||||
return values;
|
||||
return error::try_array (
|
||||
vkGetPhysicalDeviceQueueFamilyProperties, native ()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user