Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Move implementation with comment in source file

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
AdrianS Posted - Nov 17 2015 : 06:44:14 AM
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.
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Dec 17 2015 : 12:33:37 PM
case=93336 is fixed in build 2086
feline Posted - Nov 18 2015 : 5:05:39 PM
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.
AdrianS Posted - Nov 18 2015 : 05:30:05 AM
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.
feline Posted - Nov 17 2015 : 2:20:32 PM
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.

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