From 6d12e445be5e3578e2777f9b4ae59cf2f81266c3 Mon Sep 17 00:00:00 2001 From: VioletXF Date: Thu, 5 Sep 2024 01:10:53 +0900 Subject: [PATCH] Fix get total lane indices --- src/Chart.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Chart.h b/src/Chart.h index 366189a..5831d2b 100644 --- a/src/Chart.h +++ b/src/Chart.h @@ -90,10 +90,12 @@ class ChartMeta { [[nodiscard]] std::vector GetTotalLaneIndices() const { std::vector Result; - Result.insert(Result.end(), GetKeyLaneIndices().begin(), - GetKeyLaneIndices().end()); - Result.insert(Result.end(), GetScratchLaneIndices().begin(), - GetScratchLaneIndices().end()); + std::vector keyLaneIndices = GetKeyLaneIndices(); + std::vector scratchLaneIndices = GetScratchLaneIndices(); + Result.insert(Result.end(), keyLaneIndices.begin(), keyLaneIndices.end()); + Result.insert(Result.end(), scratchLaneIndices.begin(), + scratchLaneIndices.end()); + return Result; } };