diff --git a/rpcs3/Emu/RSX/Common/ShaderParam.h b/rpcs3/Emu/RSX/Common/ShaderParam.h index 19f4794fcd..87f6988d10 100644 --- a/rpcs3/Emu/RSX/Common/ShaderParam.h +++ b/rpcs3/Emu/RSX/Common/ShaderParam.h @@ -90,11 +90,11 @@ struct ParamType { } - bool SearchName(const std::string& name) + bool SearchName(const std::string& name) const { - for (u32 i = 0; i keys_to_remove; - for (auto It = temp_image_cache.begin(); It != temp_image_cache.end(); ++It) + for (const auto& temp_image : temp_image_cache) { - if (It->second.first == key) + if (temp_image.second.first == key) { - keys_to_remove.push_back(It->first); + keys_to_remove.push_back(temp_image.first); } } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 1dd5acd6e1..45b572372b 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -2172,11 +2172,11 @@ namespace rsx if (zeta_address) { //Find zeta address in bound zculls - for (int i = 0; i < rsx::limits::zculls_count; i++) + for (const auto& zcull : zculls) { - if (zculls[i].binded) + if (zcull.binded) { - const u32 rsx_address = rsx::get_address(zculls[i].offset, CELL_GCM_LOCATION_LOCAL); + const u32 rsx_address = rsx::get_address(zcull.offset, CELL_GCM_LOCATION_LOCAL); if (rsx_address == zeta_address) { zcull_surface_active = true; diff --git a/rpcs3/Emu/RSX/VK/VKOverlays.h b/rpcs3/Emu/RSX/VK/VKOverlays.h index 15d63b7949..b5efdabaf0 100644 --- a/rpcs3/Emu/RSX/VK/VKOverlays.h +++ b/rpcs3/Emu/RSX/VK/VKOverlays.h @@ -661,11 +661,11 @@ namespace vk void remove_temp_resources(u32 key) { std::vector keys_to_remove; - for (auto It = temp_image_cache.begin(); It != temp_image_cache.end(); ++It) + for (const auto& temp_image : temp_image_cache) { - if (It->second.first == key) + if (temp_image.second.first == key) { - keys_to_remove.push_back(It->first); + keys_to_remove.push_back(temp_image.first); } }