Author |
Topic |
|
MikMik
Senior Member
42 Posts |
Posted - Jan 25 2023 : 06:52:38 AM
|
If I use Introduce Variable and write the corresponding variable declaration using right pointer alignment (following our style guide), VA adds the * to the introduced variables, dereferencing them in the call site.
I know that if I leave it as is with "center" alignment, VS ends up formatting it correctly, but I think it should not mess the calls up. |
|
feline
Whole Tomato Software
United Kingdom
18988 Posts |
Posted - Jan 31 2023 : 06:50:33 AM
|
I am seeing the same problem here. It took a moment or two to work out what you were doing, but I am not sure I was able to explain this any more clearly myself For now the work around is to leave the formatting alone in the introduce variable dialog, and then remove the space afterwards.
case=149112 |
zen is the art of being at one with the two'ness |
|
|
MikMik
Senior Member
42 Posts |
Posted - Feb 01 2023 : 02:52:19 AM
|
You're right, leaving the formatting as is just works. But, out of habit, I sometimes format it by hand and then it's all wrong... |
|
|
feline
Whole Tomato Software
United Kingdom
18988 Posts |
Posted - Feb 01 2023 : 06:11:46 AM
|
If you notice this immediately, Undo will undo the refactoring. Or you can remove the unwanted * where the variable is used. A Find References on the newly introduced variable will help you quickly find all instances. Obviously these are just work arounds until we get this fixed properly. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|