Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Adding a virtual function adds virtual+override

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
xMRi Posted - Feb 24 2021 : 08:38:49 AM
When I add a virtual function with the refactoring the function is added with the keywords virtual and override.

But the code inspector says that the virtual keyword can be removed.
Doesn't really make sense.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 25 2021 : 11:19:24 AM
The option names have changed slightly since I last updated the notes I copy and paste them from, oops. In VA 2399 the option is now:

VA Options -> Code Generation -> Add keyword to generated C++ methods: override / virtual / virtual and override

where you pick one of the three options from the pull down list, and the default for a clean install of VA is "override", which is what Code Inspection recommends.
xMRi Posted - Feb 25 2021 : 02:59:34 AM
Ok. Thanks. I missed the settings.
I never changed them. So I assume that I use the defaults.
feline Posted - Feb 24 2021 : 09:04:45 AM
Adding the virtual keyword is controlled via the setting:

VA Options -> Code Generation -> Use virtual keyword for generated C++ methods

and adding the override keyword is controlled via the setting:

VA Options -> Code Generation -> Use override keyword for generated C++ methods

I need to check the default settings and read up on these keywords

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