diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-21 20:53:29 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-21 20:53:29 +0100 |
commit | c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe (patch) | |
tree | a542b2eee67cae927a507eb3d8c2fafe01163310 /drivers/vulkan | |
parent | c78153774212f432a89f512ff9d71312e23fe1ff (diff) | |
parent | 615c5170345b2b549be6271d11319a10a5ce34bf (diff) |
Merge pull request #70773 from KoBeWi/lector
Add range iterator to LocalVector
Diffstat (limited to 'drivers/vulkan')
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<const char *> &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; } |