nodet
New Member
8 Posts |
Posted - Oct 11 2007 : 09:51:57 AM
|
Hi all,
Using 10.3.1561.0. Consider the following piece of code (note that the parameter does not have the same name in the declaration and the definition):
class A { int f(int i); };
int A::f(int j) { return j; }
Using 'Change signature' on A::f to add make the method 'const' will break the code because the parameter will use the name of the declaration ('i') instead of the one of the definition ('j').
Note that if the method was declared without a parameter name, Visual Assist will also break the code by removing the name of the parameter in the definition.
In the 'Change signature' dialog, I'd rather use the way the method is defined, instead of the way it's declared. If possible, I would also try to avoid changing parts of the declaration that do not have to be changed (here, changing the name is not needed). |
Xavier Nodet "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.
|
|