Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Encapsulate field behaves wrong.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
274 Posts

Posted - Mar 13 2019 :  03:26:12 AM  Show Profile  Reply with Quote
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.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
15902 Posts

Posted - Mar 13 2019 :  10:55:35 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3153 Posts

Posted - Mar 14 2019 :  11:25:05 PM  Show Profile  Reply with Quote
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
};
Go to Top of Page

xMRi
Tomato Guru

Germany
274 Posts

Posted - Mar 15 2019 :  02:29:20 AM  Show Profile  Reply with Quote
Thanks that's a good workaround.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000