Closed traversaro closed 8 years ago
+1 On 20/02/2014 15:54, Silvio Traversaro wrote:
All pointers of input parameters in wholeBodyModel should be declared as constant pointers to constant data.
— Reply to this email directly or view it on GitHub https://github.com/robotology/codyco/issues/21.
"One should ignore whatever is going on on a set of measure zero." Henri Lebesgue
Currently they are constant pointer to variables or pointer to constact variables? In the second case I don't see what the problem is...
Currently they are plain pointers, for avoiding tragical implementations it is sufficient to turn them in pointers to constant variables, but making them also constant pointers is not bad (nel piu' ci stai il meno).
ok, just remember that code has to be beautiful (especially if it's written for beautiful robots), and
bool f(const double *const x)
is not at all beautiful! I think @giorgiometta would agree with me on this!
i am not sure that the vector classes we use return const const pointers to double, if this is the case this change can have more side effects than expected.
Ok, if double constness is ugly, making them simply pointers to const variables would be ok. @lornat75 Ok, when we will make the change I will properly test this aspects.
Not going to happen.
All input parameters of pointer type of wholeBodyModel should be declared as constant pointers to constant data.