diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 4 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 6 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index e01c6a0e0f..768b819650 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -258,8 +258,8 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str uint32_t if_v6id = 0; Map<String, IP::Interface_Info> if_info; IP::get_singleton()->get_local_interfaces(&if_info); - for (Map<String, IP::Interface_Info>::Element *E = if_info.front(); E; E = E->next()) { - IP::Interface_Info &c = E->get(); + for (KeyValue<String, IP::Interface_Info> &E : if_info) { + IP::Interface_Info &c = E.value; if (c.name != p_if_name) { continue; } diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 086d3b4284..8743135f89 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -8688,10 +8688,10 @@ void RenderingDeviceVulkan::_free_pending_resources(int p_frame) { while (frames[p_frame].framebuffers_to_dispose_of.front()) { Framebuffer *framebuffer = &frames[p_frame].framebuffers_to_dispose_of.front()->get(); - for (Map<Framebuffer::VersionKey, Framebuffer::Version>::Element *E = framebuffer->framebuffers.front(); E; E = E->next()) { + for (const KeyValue<Framebuffer::VersionKey, Framebuffer::Version> &E : framebuffer->framebuffers) { //first framebuffer, then render pass because it depends on it - vkDestroyFramebuffer(device, E->get().framebuffer, nullptr); - vkDestroyRenderPass(device, E->get().render_pass, nullptr); + vkDestroyFramebuffer(device, E.value.framebuffer, nullptr); + vkDestroyRenderPass(device, E.value.render_pass, nullptr); } frames[p_frame].framebuffers_to_dispose_of.pop_front(); 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; |