From 85a613957528b27bb6dd830fec4569aeaf853204 Mon Sep 17 00:00:00 2001 From: Scott Doxey Date: Tue, 17 Sep 2024 09:07:40 -0400 Subject: [PATCH] Fixed invalid size method usage. --- includes/RhythmGameUtilities/Utilities.hpp | 2 +- tests/RhythmGameUtilities/UtilitiesInternal.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/RhythmGameUtilities/Utilities.hpp b/includes/RhythmGameUtilities/Utilities.hpp index ab177a8..abef558 100644 --- a/includes/RhythmGameUtilities/Utilities.hpp +++ b/includes/RhythmGameUtilities/Utilities.hpp @@ -76,7 +76,7 @@ GenerateAdjacentKeyPairs(std::map keyValuePairs) std::vector sortedKeys(keys.begin(), keys.end()); - for (auto i = 0; i < size(sortedKeys) - 1; i += 1) + for (auto i = 0; i < sortedKeys.size() - 1; i += 1) { adjacentKeyPairs.push_back( std::make_tuple(sortedKeys[i], sortedKeys[i + 1])); diff --git a/tests/RhythmGameUtilities/UtilitiesInternal.cpp b/tests/RhythmGameUtilities/UtilitiesInternal.cpp index 82daa35..7d2ccc0 100644 --- a/tests/RhythmGameUtilities/UtilitiesInternal.cpp +++ b/tests/RhythmGameUtilities/UtilitiesInternal.cpp @@ -24,7 +24,7 @@ void testConvertSecondsToTicksInternal() assert(1408 == ConvertSecondsToTicksInternal(5, 192, &bpmChangesKeys[0], &bpmChangesValues[0], - size(bpmChanges))); + bpmChanges.size())); std::cout << "."; } @@ -48,7 +48,7 @@ void testCalculateBeatBarsInternal() auto beatBars = CalculateBeatBarsInternal(&bpmChangesKeys[0], &bpmChangesValues[0], - size(bpmChanges), 192, 4, true, outSize); + bpmChanges.size(), 192, 4, true, outSize); assert(*outSize == 446);