horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

Remove empty destructors where needed #129

Open neurocod opened 6 years ago

neurocod commented 6 years ago

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

CameraToolBar::~CameraToolBar()
{
}
algts commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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