diff --git a/rpcs3/Emu/RSX/rsx_methods.h b/rpcs3/Emu/RSX/rsx_methods.h index 96d62686c4..5450f2f68b 100644 --- a/rpcs3/Emu/RSX/rsx_methods.h +++ b/rpcs3/Emu/RSX/rsx_methods.h @@ -95,10 +95,7 @@ namespace rsx void insert_draw_command(u32 index, const draw_range_t& range) { auto range_It = draw_command_ranges.begin(); - while (index--) - { - ++range_It; - } + std::advance(range_It, index); draw_command_ranges.insert(range_It, range);