pcl icon indicating copy to clipboard operation
pcl copied to clipboard

[custom] Remove empty destructors and constructors

Open gnawme opened this issue 4 years ago • 2 comments

This issue is to split PR #4249 into smaller pieces.

Per @SergioRAgostinho

With destructors I use the following policy:

if your class defines virtual methods which it defines (literally defining, not overriding), I explicitly default it. The compiler throws warnings telling if of your class has virtual methods but the destructor is not virtual.

If a class has empty / default destructors I just remove those lines of code. If the destructor is not implicitly generated you'll get a compiler error, so there's no chance you'll mess up.

For constructors: remove all default constructors unless there's a user defined (non-default) constructor.

From @kunaltyagi: https://godbolt.org/z/8f99dG

gnawme avatar Jul 20 '20 17:07 gnawme

Hey maintainer, I would like to work on this issue. Request you to assign me on this.

KewlShubh avatar Jan 15 '22 18:01 KewlShubh

Hey maintainer, I would like to work on this issue. Request you to assign me on this.

I'm not sure who the maintainers are these days. I've had a couple of pull requests pending for months. You could just start working on it...

gnawme avatar Jan 15 '22 21:01 gnawme