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
 Move implementation with comment in source file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdrianS
Senior Member

Canada
31 Posts

Posted - Nov 17 2015 :  06:44:14 AM  Show Profile  Reply with Quote
Consider this simple class -

In the header file:
class dummy
{
   void foo();
   void bar(){};
}
in the source file:
void dummy::foo()
{
   //do something
}
With the above, a "Move Implementation to Source File" does the expected and adds dummy::bar() at the end of the source file. However, I'm finding that if the preceding function in the source file has a comment immediately following it, the implementation is placed inside the preceding function.

So, if you have:
void dummy::foo()
{
   //do something
}
//a comment here
the result is:
void dummy::foo()
{
   //do something
   void dummy::bar()
   {
   }
}
//a comment here
This is using build 2076.

Edited by - AdrianS on Nov 17 2015 06:44:58 AM

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Nov 17 2015 :  2:20:32 PM  Show Profile  Reply with Quote
Oops, that's not right. Thank you for the very clear description:

case=93336

For me, this only happens if "dummy::foo()" is the last function in the cpp file. If there is a function after it then I don't see this problem, which is something.

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

AdrianS
Senior Member

Canada
31 Posts

Posted - Nov 18 2015 :  05:30:05 AM  Show Profile  Reply with Quote
I think that you may be correct about dummy::foo() being the last function in the file. I'll keep an eye out and see if it happens anywhere else.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Nov 18 2015 :  5:05:39 PM  Show Profile  Reply with Quote
I could only reproduce with this being the last function in the file, but its certainly possible you will encounter this elsewhere as well. I really hope not, but it would be foolish to dismiss the possibility.

Hopefully though you only see this problem very occasionally, since VA should not be generating bad code like this.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Dec 17 2015 :  12:33:37 PM  Show Profile  Reply with Quote
case=93336 is fixed in build 2086
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