-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coding style changes: deprecated and override #1620
Comments
Correct. |
What's the thinking on empty overridden destructors? Remove or keep? |
Remove. |
Is there any justification for using |
I cannot think of any ... So yes, please, use SmingCore.h instead of SmingCore/SmingCore.h . |
I'm working on a PR to enforce use of
__ attribute__((deprecated))
throughout the framework; I'm proposing to use a macro__deprecated
for convenience. The purpose is to ensure the framework (including samples) builds without internally referencing any deprecated items. Travis enforces this. It will also assist users in migrating their code.The second item is to apply
override
to every overridden virtual function. The purpose is to catch typing errors; using virtual with a mis-spelled method name or parameter type will simply create a new method. Usingoverride
will throw a warning if the base method isn't declaredvirtual
.One possible point of contention is whether to use
virtual
oroverride
on inherited destructors. I'm thinking not, as it doesn't add anything and can actually confuse. virtual destructors do not behave like regular virtual methods, and typos are already flagged by the compiler.Any other 'modernisations' we can consider?
Thoughts?
The text was updated successfully, but these errors were encountered: