You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Keyframe::GetDelta() removed unused loop and variables
This commit is contained in:
@@ -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<Coordinate>::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<Coordinate>::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;
|
||||
|
||||
Reference in New Issue
Block a user