Skip to content

Commit 7f45756

Browse files
committed
Minor optimization.
1 parent feaca4d commit 7f45756

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/task/task.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ computeErrorTimeDerivative( dynamicgraph::Vector & res, int time)
251251

252252
const dynamicgraph::Vector& partialErrorDot = feature.getErrorDot()(time);
253253
const int dim = partialErrorDot.size();
254-
for( int k=0;k<dim;++k ){ res(cursor++) = partialErrorDot(k); }
254+
res.segment (cursor, dim) = partialErrorDot;
255+
cursor += dim;
255256
}
256257

257258
return res;

0 commit comments

Comments
 (0)