Horde3D icon indicating copy to clipboard operation
Horde3D copied to clipboard

Remove empty destructors where needed

Open neurocod opened this issue 7 years ago • 3 comments

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

CameraToolBar::~CameraToolBar()
{
}

neurocod avatar Sep 05 '18 04:09 neurocod

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.

algts avatar Sep 05 '18 20:09 algts

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.

neurocod avatar Sep 05 '18 21:09 neurocod

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

horde3d avatar Sep 05 '18 22:09 horde3d