Skip to content

Commit 6ca5c9f

Browse files
author
Benjamin Chrétien
committed
Fix for clang
1 parent 2ce06c3 commit 6ca5c9f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/tnlp.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ namespace roboptim
213213
typedef solver_t::problem_t::constraints_t::const_iterator
214214
citer_t;
215215

216-
int constraintId = 0;
216+
size_t constraintId = 0;
217217
for (citer_t it = solver_.problem ().constraints ().begin ();
218-
it != solver_.problem ().constraints ().end (); ++it)
218+
it != solver_.problem ().constraints ().end (); ++it, constraintId++)
219219
{
220220
shared_ptr<solver_t::commonConstraintFunction_t> g;
221221
if (it->which () == LINEAR)
@@ -229,8 +229,7 @@ namespace roboptim
229229
g->jacobian (jac, x_);
230230

231231
IpoptCheckGradient
232-
(*g, 0, x_,
233-
constraintId++, solver_);
232+
(*g, 0, x_, static_cast<int> (constraintId), solver_);
234233
}
235234

236235
// Copy jacobian values from internal sparse matrices.

0 commit comments

Comments
 (0)