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
 [BUG] Move implementation to source file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Alexis Pautrot
Junior Member

21 Posts

Posted - Feb 20 2012 :  08:54:02 AM  Show Profile  Reply with Quote
Hi, here is a bug reported for version 10.6.1862.0 built 2011.12.13 :

On a method with a comment on the same line :

class Foo
{
public:

  void Method()   // I like putting comment on the same line
  {
    ...
  }
}


The Move Implementation to Source File will result in moving the method body, but will add ';' to end of the method declaration line, hence in the comment.

class Foo
{
public:

  void Method()   // I like putting comment on the same line;
}



Bye.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 20 2012 :  12:26:55 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=30651
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 07 2014 :  09:55:11 AM  Show Profile  Reply with Quote
case=30651 is fixed in build 2052
Go to Top of Page

AndreasS
Junior Member

Germany
11 Posts

Posted - Feb 11 2015 :  04:19:34 AM  Show Profile  Reply with Quote
A similar problem is, that sometime remains two ';'

class Foo
{
public:

CString GetName() {return m_strName;};

protected:
CString m_strName;
};

The Move Implementation to Source File will result in moving the method body, and will add ';' to end of method declaration line.

class Foo
{
public:

CString GetName();;

protected:
CString m_strName;
};

Edited by - AndreasS on Feb 11 2015 04:22:33 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Feb 11 2015 :  1:50:14 PM  Show Profile  Reply with Quote
I am seeing the same effect, but strictly speaking VA is preserving the existing code when doing the move. You have an extra semi-colon on the function in the header file before the move, and you still have it after the move.

Is there a reason for this extra semi-colon in the header file? I cannot think of a situation where you would need it, but I might just be missing something.

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

AndreasS
Junior Member

Germany
11 Posts

Posted - Feb 17 2015 :  05:58:50 AM  Show Profile  Reply with Quote
In formal your are right.
I used to write a semi-colon after every method in header file. I do this with or without a implementation.
VA have to insert a semi-colon if there isn't one, but maybe you can omit inserting a semi-colon if you find one at the same line (and at the right position ignoring spaces)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Feb 17 2015 :  8:50:20 PM  Show Profile  Reply with Quote
A fair point, I have put in a bug report for this, but since we are still left with valid code this is not a high priority bug:

case=87958

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000