commit | 1141f4ad1a543ed10dd0028f3b05cb99db2ef70c | [log] [tgz] |
---|---|---|
author | Alex Stewart <alexs.mac@gmail.com> | Sat Feb 24 18:51:54 2018 +0000 |
committer | Alex Stewart <alexs.mac@gmail.com> | Sat Feb 24 18:51:54 2018 +0000 |
tree | 3146c323993624fea85ec73c9691bc6eeb48cec7 | |
parent | 126e0ef0fe30559da3bb3c8e8ee7cad30e0e5e52 [diff] |
Fix integer conversion warning in MSVC. - Raised by cnovel as issue #346: https://github.com/ceres-solver/ceres-solver/issues/346. Change-Id: I90815ab6412834dd793ca7c327002d551da0675b
diff --git a/include/ceres/dynamic_autodiff_cost_function.h b/include/ceres/dynamic_autodiff_cost_function.h index 1cece2c..4a31236 100644 --- a/include/ceres/dynamic_autodiff_cost_function.h +++ b/include/ceres/dynamic_autodiff_cost_function.h
@@ -105,7 +105,8 @@ // To work around this issue, the solution here is to evaluate the // jacobians in a series of passes, each one computing Stripe * // num_residuals() derivatives. This is done with small, fixed-size jets. - const int num_parameter_blocks = parameter_block_sizes().size(); + const int num_parameter_blocks = + static_cast<int>(parameter_block_sizes().size()); const int num_parameters = std::accumulate(parameter_block_sizes().begin(), parameter_block_sizes().end(), 0);