mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Declare the iterator variable outside the loop in curve_fitting.c
Change-Id: I4ce703c8d6a6deb3aebaccd3cd5d916c7aa4f92e
This commit is contained in:
committed by
Gerrit Code Review
parent
dbc398d66e
commit
f9e9d6ef36
@@ -155,7 +155,8 @@ int main(int argc, char** argv) {
|
||||
int parameter_sizes[] = { 1, 1 };
|
||||
|
||||
ceres_problem_t* problem = ceres_create_problem();
|
||||
for (int i = 0; i < num_observations; ++i) {
|
||||
int i;
|
||||
for (i = 0; i < num_observations; ++i) {
|
||||
ceres_problem_add_residual_block(
|
||||
problem,
|
||||
exponential_residual, /* Cost function */
|
||||
|
||||
Reference in New Issue
Block a user