Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Encapsulate field behaves wrong.

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
xMRi Posted - Mar 13 2019 : 03:26:12 AM
I have this code.

class CFoo 
{
public:
    CFoo();
private:
    int i1, // Comment 1
        i2, // Comment 2
        i3; // Comment 3
};


Place the Cursor on i1 or i2 and execute "Encapsulate field".
The code get broken. Even if I select another access level (protected).

Also it is not possible to make the getter/setter for i2 public.
3   L A T E S T    R E P L I E S    (Newest First)
xMRi Posted - Mar 15 2019 : 02:29:20 AM
Thanks that's a good workaround.
accord Posted - Mar 14 2019 : 11:25:05 PM
For now, you may consider using semicolons instead of commas as a workaround:

class CFoo 
{
public:
    CFoo();
private:
    int i1; // Comment 1
    int i2; // Comment 2
    int i3; // Comment 3
};
feline Posted - Mar 13 2019 : 10:55:35 AM
I am seeing the same effect here. Thank you for the clear description.

case=137685

If it helps VA does correctly handle the version that goes:

int i1, i2, i3;

but obviously with the comments after each variable name, this won't work so well.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000