diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-25 12:52:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 12:52:58 +0200 |
commit | ff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63 (patch) | |
tree | 42543cc85d27d2c8692a2ced4bac5c537e402004 /drivers | |
parent | 2f221e5fd507b176590bda52d08e499629ce7761 (diff) | |
parent | ac3322b0af8f23e8e2dac8111200bc69b5604c9f (diff) |
Merge pull request #50809 from akien-mga/iterators-const-references
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 2 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index 4c33feb52c..e01c6a0e0f 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -269,7 +269,7 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str break; // IPv6 uses index. } - for (IPAddress &F : c.ip_addresses) { + for (const IPAddress &F : c.ip_addresses) { if (!F.is_ipv4()) { continue; // Wrong IP type } diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 48e4be498b..f0a1531f70 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -8542,7 +8542,7 @@ void RenderingDeviceVulkan::_free_rids(T &p_owner, const char *p_type) { } else { WARN_PRINT(vformat("%d RIDs of type \"%s\" were leaked.", owned.size(), p_type)); } - for (RID E : owned) { + for (const RID &E : owned) { free(E); } } @@ -8769,7 +8769,7 @@ void RenderingDeviceVulkan::finalize() { E = N; } //free non shared second, this will avoid an error trying to free unexisting textures due to dependencies. - for (RID E : owned) { + for (const RID &E : owned) { free(E); } } |