Skip to content

Commit

Permalink
Remove unused-variable in mapillary/opensfm/opensfm/src/geometry/abso…
Browse files Browse the repository at this point in the history
…lute_pose.h

Summary:
LLVM-15 has a warning `-Wunused-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]]`.

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

Reviewed By: fabianschenk

Differential Revision: D59586421

fbshipit-source-id: 6a8eece4ed9e6015a73021a0ee3bba4d1a0c49b6
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jul 10, 2024
1 parent 7b531ae commit da78973
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions opensfm/src/geometry/absolute_pose.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ std::vector<Eigen::Matrix<double, 3, 4>> AbsolutePoseThreePoints(IT begin,
// Compute k1, k2 and k3
const Eigen::Vector3d k1 = (p1 - p2).normalized();
const Eigen::Vector3d k3 = (b1.cross(b2)).normalized();
const Eigen::Vector3d k2 = (k1.cross(k3)).normalized();

// Compute ui and vi for i = 1, 2
const Eigen::Vector3d u1 = p1 - p3;
Expand Down Expand Up @@ -93,7 +92,6 @@ std::vector<Eigen::Matrix<double, 3, 4>> AbsolutePoseThreePoints(IT begin,
e1 << 1, 0, 0;
e2 << 0, 1, 0;

constexpr double eps = 1e-20;
for (const auto &root : roots) {
const auto cos_theta_1 = root;
const auto sin_theta_1 =
Expand Down

0 comments on commit da78973

Please sign in to comment.