Author |
Topic ![Next Topic Next Topic](icon_go_right.png) |
|
MikMik
Senior Member
![](icon_star_green.gif) ![](icon_star_green.gif) ![](icon_star_green.gif)
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.
![](https://forums.wholetomato.com/forum/uploaded/MikMik/202312565020_Captura de pantalla 2023-01-25 124811.png)
![](https://forums.wholetomato.com/forum/uploaded/MikMik/202312565043_2023-01-25_12h48_52.png)
![](https://forums.wholetomato.com/forum/uploaded/MikMik/202312565055_2023-01-25_12h49_13.png)
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
![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif)
United Kingdom
18843 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 |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
MikMik
Senior Member
![](icon_star_green.gif) ![](icon_star_green.gif) ![](icon_star_green.gif)
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... |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
feline
Whole Tomato Software
![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif)
United Kingdom
18843 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 |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
|
Topic ![Next Topic Next Topic](icon_go_right.png) |
|