Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1715: Change Signature fails

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
khb Posted - Feb 19 2009 : 1:21:50 PM
Assume I have the following code:
class SF
{
public:
    inline static BOOL bBlub(const CString &strBlush);
}

BOOL SF::bBlub(const CString &strBlush)
{
    return TRUE;
}
When I now use Change Signature on the declaration and change BOOL to bool then I get for the definition:
BOOL Sinline  bool SF::bBlub(const CString &strBlush)
 return TRUE;
}
I'm using VC6, WinXP, no other add-ins.

Regards
Marcus

P.S.: Just corrected some typos. Was to late last night. Sorry.
8   L A T E S T    R E P L I E S    (Newest First)
khb Posted - Feb 25 2009 : 2:54:00 PM
Me too. My feeling is I always get those. Anyway, I'll try to pin down the next problem a bit better

Regards
Marcus
feline Posted - Feb 25 2009 : 12:55:53 PM
*sigh* I hate problems that just appear and disappear, it can be really hard to pin them down.

Change Signature, VA tends to make both the implementation and the declaration look the same, partly for simplicity.
khb Posted - Feb 25 2009 : 02:45:07 AM
I don't have any weird "ifdef" constructs, but I missed an important thing: If you have a problem shut down your machine, start it up again and try to reproduce the problem then. On the day I wrote the first message I was able to constantly reproduce the problem. Now I can't reproduce it any more. Anyway, there is still an additional space character between "inline" and "bool" as it can be seen in the second declaration of my first post.

Regards
Marcus

P.S.: As far as I know the inline keyword is either allowed for the declaration or the definition of a function. I always put the inline keyword to the declaration. But if I then use Change Signature for one of my inline functions the inline keyword is also added to the definition.
feline Posted - Feb 24 2009 : 10:05:00 AM
One thing to look out for, do you have code like this:

void functionThatMightBreakThings()
{
#if 0
    {
        {
#endif
}

Obviously this is a very simple example, but it shows the concept. Occasionally this comes up, and it might be causing the problem you are seeing here.
khb Posted - Feb 24 2009 : 02:43:16 AM
I'll try to set up a test project within the next days...

Regards
Marcus
feline Posted - Feb 23 2009 : 11:51:59 AM
Is there any chance of getting a copy of the original code where you see this problem? I am guessing something is confusing our parser, but I have no idea what that something is.
khb Posted - Feb 23 2009 : 03:02:28 AM
I'm sorry, I forgot to add the semicolon in the message above. I just stripped down my code a bit and missed it here. I my real code the semicolon is there. Otherwise it wouldn't copile, I guess. Anyway, Change Signature doesn't work for me in this case.

Regards
Marcus
feline Posted - Feb 20 2009 : 12:33:58 PM
Are you aware that this code is invalid? There is no semi-colon at the end of the class declaration.

Add the missing semi-colon and Change Signature works correctly.

I agree that VA should not delete code, but I am not quite sure what to say here, since the problem is that the invalid code is confusing our parser. "do something sensible for invalid code" is opening a massive area.

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