From d47c40dc141e970165b0b8e11ba41a2fa76fec0d Mon Sep 17 00:00:00 2001 From: Daniel Jour Date: Tue, 19 Nov 2019 21:31:38 +0100 Subject: [PATCH] Keyframe::GetDelta() removed unused loop and variables --- src/KeyFrame.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index 3035a670..6c17d6af 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -479,9 +479,7 @@ double Keyframe::GetDelta(int64_t index) if (index >= 1 && (index + 1) < Values.size()) { int64_t current_value = GetLong(index); int64_t previous_value = 0; - int64_t next_value = 0; int64_t previous_repeats = 0; - int64_t next_repeats = 0; // Loop backwards and look for the next unique value for (std::vector::iterator backwards_it = Values.begin() + index; backwards_it != Values.begin(); backwards_it--) { @@ -495,18 +493,6 @@ double Keyframe::GetDelta(int64_t index) } } - // Loop forwards and look for the next unique value - for (std::vector::iterator forwards_it = Values.begin() + (index + 1); forwards_it != Values.end(); forwards_it++) { - next_value = long(round((*forwards_it).Y)); - if (next_value == current_value) { - // Found same value - next_repeats++; - } else { - // Found non repeating value, no more repeats found - break; - } - } - // Check for matching previous value (special case for 1st element) if (current_value == previous_value) previous_value = 0;