Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 OVERRIDE macro not removed from impl

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
sneftel Posted - Nov 20 2013 : 04:54:20 AM
When a member function declaration is marked override, the override is removed from the implementation by "Create Implementation".

In our codebase, though, we use an OVERRIDE macro instead (to support older compilers which use different keywords or don't have the feature). This macro is copied to the implementation, causing a compile error.

It's not a huge problem, but you might consider stripping macro identifiers depending on their expansion. (I could see this happening with static or virtual, for instance.)
4   L A T E S T    R E P L I E S    (Newest First)
sneftel Posted - Nov 21 2013 : 05:00:52 AM
Ah, I see... the literal macro name OVERRIDE was special-cased. Makes sense.
sean Posted - Nov 20 2013 : 12:49:48 PM
Thanks for the example. Since OVERRIDE != HK_OVERRIDE it's clear why the fix for 68634 has no effect in your codebase.
I've opened a bug for this (case=78572).
sneftel Posted - Nov 20 2013 : 12:15:14 PM
Sure. This is build 1940, BTW.

#define HK_OVERRIDE override

struct Foo
{
	virtual void foo();
};

struct Bar : public Foo
{
	void foo() HK_OVERRIDE;
};


Right click Bar::foo, "Create Implementation". The following is added:


void Bar::foo() HK_OVERRIDE
{

}
sean Posted - Nov 20 2013 : 10:21:59 AM
OVERRIDE was supposed to have been fixed in build 1918 (case=68634). A quick test here shows that it is removed. If you are using build 1918 or higher, then could you please post sample code where OVERRIDE is being inserted with the implementation?

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