Skip to content

Commit

Permalink
Remove unused variables in mapillary/opensfm/opensfm/src/third_party/…
Browse files Browse the repository at this point in the history
…akaze/lib/AKAZE.cpp

Summary:
LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: dmm-fb

Differential Revision: D54378379

fbshipit-source-id: 0a23b525ffbe0862e32609ce45af4c2cd7794551
  • Loading branch information
r-barnes authored and facebook-github-bot committed Mar 7, 2024
1 parent afb0c15 commit 78b795c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions opensfm/src/third_party/akaze/lib/AKAZE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void AKAZE::Find_Scale_Space_Extrema(std::vector<cv::KeyPoint>& kpts) {
double t1 = 0.0, t2 = 0.0;
float value = 0.0;
float dist = 0.0, ratio = 0.0, smax = 0.0;
int npoints = 0, id_repeated = 0;
int id_repeated = 0;
int sigma_size_ = 0, left_x = 0, right_x = 0, up_y = 0, down_y = 0;
bool is_extremum = false, is_repeated = false, is_out = false;
cv::KeyPoint point;
Expand Down Expand Up @@ -357,7 +357,6 @@ void AKAZE::Find_Scale_Space_Extrema(std::vector<cv::KeyPoint>& kpts) {
point.pt.x *= ratio;
point.pt.y *= ratio;
kpts_aux.push_back(point);
npoints++;
}
else {
point.pt.x *= ratio;
Expand Down

0 comments on commit 78b795c

Please sign in to comment.