diff options
Diffstat (limited to 'drivers/vulkan/vulkan_context.cpp')
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 1c7e83af21..152efc7807 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -1755,8 +1755,8 @@ Error VulkanContext::prepare_buffers() { vkWaitForFences(device, 1, &fences[frame_index], VK_TRUE, UINT64_MAX); vkResetFences(device, 1, &fences[frame_index]); - for (Map<int, Window>::Element *E = windows.front(); E; E = E->next()) { - Window *w = &E->get(); + for (KeyValue<int, Window> &E : windows) { + Window *w = &E.value; w->semaphore_acquired = false; @@ -1837,8 +1837,8 @@ Error VulkanContext::swap_buffers() { VkSemaphore *semaphores_to_acquire = (VkSemaphore *)alloca(windows.size() * sizeof(VkSemaphore)); uint32_t semaphores_to_acquire_count = 0; - for (Map<int, Window>::Element *E = windows.front(); E; E = E->next()) { - Window *w = &E->get(); + for (KeyValue<int, Window> &E : windows) { + Window *w = &E.value; if (w->semaphore_acquired) { semaphores_to_acquire[semaphores_to_acquire_count++] = w->image_acquired_semaphores[frame_index]; @@ -1876,8 +1876,8 @@ Error VulkanContext::swap_buffers() { VkCommandBuffer *cmdbufptr = (VkCommandBuffer *)alloca(sizeof(VkCommandBuffer *) * windows.size()); submit_info.pCommandBuffers = cmdbufptr; - for (Map<int, Window>::Element *E = windows.front(); E; E = E->next()) { - Window *w = &E->get(); + for (KeyValue<int, Window> &E : windows) { + Window *w = &E.value; if (w->swapchain == VK_NULL_HANDLE) { continue; @@ -1911,8 +1911,8 @@ Error VulkanContext::swap_buffers() { present.pSwapchains = pSwapchains; present.pImageIndices = pImageIndices; - for (Map<int, Window>::Element *E = windows.front(); E; E = E->next()) { - Window *w = &E->get(); + for (KeyValue<int, Window> &E : windows) { + Window *w = &E.value; if (w->swapchain == VK_NULL_HANDLE) { continue; |