Skip to content

Commit

Permalink
Rename variable to avoid shadowing
Browse files Browse the repository at this point in the history
Summary: This is a better renaming of what was proposed in D52582811.

Reviewed By: YanNoun

Differential Revision: D52596501

fbshipit-source-id: 17a4b2e3b17a2040908d16c007cea3556c7302bf
  • Loading branch information
Fabian Schenk authored and facebook-github-bot committed Jan 8, 2024
1 parent 7f170d0 commit 569f6d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions opensfm/src/bundle/src/bundle_adjuster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -561,17 +561,17 @@ void BundleAdjuster::Run() {
ceres::Problem problem;

// Add cameras
for (auto &i : cameras_) {
auto &data = i.second.GetValueData();
for (auto &[_, cam] : cameras_) {
auto &data = cam.GetValueData();
problem.AddParameterBlock(data.data(), data.size());

// Lock parameters based on bitmask of parameters : only constant for now
if (i.second.GetParametersToOptimize().empty()) {
if (cam.GetParametersToOptimize().empty()) {
problem.SetParameterBlockConstant(data.data());
}

// Add a barrier for constraining transition of dual to stay in [0, 1]
const auto camera = i.second.GetValue();
const auto camera = cam.GetValue();
if (camera.GetProjectionType() == geometry::ProjectionType::DUAL) {
const auto types = camera.GetParametersTypes();
int index = -1;
Expand Down

0 comments on commit 569f6d3

Please sign in to comment.