From 615c5170345b2b549be6271d11319a10a5ce34bf Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 29 Dec 2022 01:24:45 +0100 Subject: Use range iterators in LocalVector loops --- drivers/vulkan/vulkan_context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 0bccefede8..27f96f35af 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -353,11 +353,11 @@ Error VulkanContext::_get_preferred_validation_layers(uint32_t *count, const cha ERR_FAIL_V(ERR_CANT_CREATE); } - for (uint32_t i = 0; i < instance_validation_layers_alt.size(); i++) { - if (_check_layers(instance_validation_layers_alt[i].size(), instance_validation_layers_alt[i].ptr(), instance_layer_count, instance_layers)) { - *count = instance_validation_layers_alt[i].size(); + for (const LocalVector &layer : instance_validation_layers_alt) { + if (_check_layers(layer.size(), layer.ptr(), instance_layer_count, instance_layers)) { + *count = layer.size(); if (names != nullptr) { - *names = instance_validation_layers_alt[i].ptr(); + *names = layer.ptr(); } break; } -- cgit v1.2.3