Skip to content
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

Remove empty destructors where needed #129

Open
neurocod opened this issue Sep 5, 2018 · 3 comments
Open

Remove empty destructors where needed #129

neurocod opened this issue Sep 5, 2018 · 3 comments

Comments

@neurocod
Copy link

neurocod commented Sep 5, 2018

All QObject-derived classes have virtual destructors, so there is no need for empty destructor stubs in many files, like

CameraToolBar::~CameraToolBar()
{
}
@algts
Copy link
Collaborator

algts commented Sep 5, 2018

Hello. This issue is more of personal preference, I think. Many programmers like to clearly define constructors/destructors, so you always know what is the behaviour of the specific class.
It is probably low priority for now, but you can always pull request your changes.

@neurocod
Copy link
Author

neurocod commented Sep 5, 2018

Yeah, I know it's low priority, just wanted to know opinion before possible PR. I don't agree with another part - after defining empty destructor, one needs to look at it's definition to ensure that it makes nothing, just like absent destructor. Without explicit destructor programmer knows default deletion behaviour, with declaration programmer becomes unaware with what is going on untill peeks definition.

@horde3d
Copy link
Owner

horde3d commented Sep 5, 2018

Feel free to commit a PR. I don't care if we have empty destructors or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants