From 63c20e08c477b8fbb3514008aed66788e6da93ed Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 18 Apr 2023 11:23:49 +0200 Subject: [PATCH] Fix set but unused variable in Libmv --- intern/libmv/libmv/autotrack/autotrack.cc | 6 ++---- intern/libmv/libmv/simple_pipeline/keyframe_selection.cc | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/intern/libmv/libmv/autotrack/autotrack.cc b/intern/libmv/libmv/autotrack/autotrack.cc index a407639ecfa..8e025de249a 100644 --- a/intern/libmv/libmv/autotrack/autotrack.cc +++ b/intern/libmv/libmv/autotrack/autotrack.cc @@ -283,15 +283,13 @@ void AutoTrack::DetectAndTrack(const DetectAndTrackOptions& options) { // Find tracks in the previous frame that are not in this one. vector previous_frame_markers_to_track; - int num_skipped = 0; for (int i = 0; i < previous_frame_markers.size(); ++i) { if (std::binary_search(tracks_in_this_frame.begin(), tracks_in_this_frame.end(), previous_frame_markers[i].track)) { - num_skipped++; - } else { - previous_frame_markers_to_track.push_back(&previous_frame_markers[i]); + continue; } + previous_frame_markers_to_track.push_back(&previous_frame_markers[i]); } // Finally track the markers from the last frame into this one. diff --git a/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc b/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc index e3e59171b63..a72970355ff 100644 --- a/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc +++ b/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc @@ -140,7 +140,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks, int max_image = filtered_tracks.MaxImage(); int next_keyframe = 1; - int number_keyframes = 0; // Limit correspondence ratio from both sides. // On the one hand if number of correspondent features is too low, @@ -162,7 +161,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks, LG << "Found keyframe " << next_keyframe; - number_keyframes++; next_keyframe = -1; for (int candidate_image = current_keyframe + 1; @@ -406,7 +404,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks, // However, it's just quick hack and smarter way to do this would be nice if (next_keyframe == -1) { next_keyframe = current_keyframe + 10; - number_keyframes = 0; if (next_keyframe >= max_image) break;