From bb5a5380266e4ef5e511d6daafd84fed2976555b Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:14:18 -0700 Subject: [PATCH] Range based for loop in GetBPMs --- src/TimingData.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 8b400ba99a..9c0ff3428b 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -1533,8 +1533,10 @@ public: std::vector vBPMs; const std::vector &bpms = p->GetTimingSegments(SEGMENT_BPM); - for (unsigned i = 0; i < bpms.size(); i++) - vBPMs.push_back( ToBPM(bpms[i])->GetBPM() ); + for (TimingSegment* bpm : bpms) + { + vBPMs.push_back( ToBPM(bpm)->GetBPM() ); + } LuaHelpers::CreateTableFromArray(vBPMs, L); return 1;