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 /editor/plugins/bone_map_editor_plugin.cpp | |
parent | c78153774212f432a89f512ff9d71312e23fe1ff (diff) | |
parent | 615c5170345b2b549be6271d11319a10a5ce34bf (diff) | |
download | redot-engine-c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe.tar.gz |
Merge pull request #70773 from KoBeWi/lector
Add range iterator to LocalVector
Diffstat (limited to 'editor/plugins/bone_map_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/bone_map_editor_plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp index c913a9b0ab..3d94dd13a7 100644 --- a/editor/plugins/bone_map_editor_plugin.cpp +++ b/editor/plugins/bone_map_editor_plugin.cpp @@ -566,9 +566,9 @@ int BoneMapper::search_bone_by_name(Skeleton3D *p_skeleton, Vector<String> p_pic if (hit_list.size() > 0) { shortest = hit_list[0]; - for (uint32_t i = 0; i < hit_list.size(); i++) { - if (hit_list[i].length() < shortest.length()) { - shortest = hit_list[i]; // Prioritize parent. + for (const String &hit : hit_list) { + if (hit.length() < shortest.length()) { + shortest = hit; // Prioritize parent. } } } @@ -592,9 +592,9 @@ int BoneMapper::search_bone_by_name(Skeleton3D *p_skeleton, Vector<String> p_pic if (hit_list.size() > 0) { shortest = hit_list[0]; - for (uint32_t i = 0; i < hit_list.size(); i++) { - if (hit_list[i].length() <= shortest.length()) { - shortest = hit_list[i]; // Prioritize parent. + for (const String &hit : hit_list) { + if (hit.length() <= shortest.length()) { + shortest = hit; // Prioritize parent. } } } |