File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ namespace dynamicgraph {
92
92
93
93
dg::Vector& FeaturePosture::computeError ( dg::Vector& res, int t)
94
94
{
95
- dg::Vector state = state_.access (t);
96
- dg::Vector posture = posture_.access (t);
95
+ const dg::Vector& state = state_.access (t);
96
+ const dg::Vector& posture = posture_.access (t);
97
97
98
98
res.resize (nbActiveDofs_);
99
99
std::size_t index =0 ;
@@ -135,11 +135,11 @@ namespace dynamicgraph {
135
135
void
136
136
FeaturePosture::selectDof (unsigned dofId, bool control)
137
137
{
138
- dg:: Vector state = state_.accessCopy ();
139
- dg:: Vector posture = posture_.accessCopy ();
140
- unsigned int dim = state.size ();
138
+ const Vector& state = state_.accessCopy ();
139
+ const Vector& posture = posture_.accessCopy ();
140
+ std:: size_t dim ( state.size () );
141
141
142
- if (dim != posture.size ()) {
142
+ if (dim != (std:: size_t ) posture.size ()) {
143
143
throw std::runtime_error
144
144
(" Posture and State should have same dimension." );
145
145
}
You can’t perform that action at this time.
0 commit comments