Skip to content

Remove unnecessary noexcept identifier from destructors #139

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

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

fekir
Copy link
Contributor

@fekir fekir commented Aug 21, 2017

This is a pull request for "cleaning" the destructors.

I've removed the noexcept identifier since it is unnecessary.

Some destructor are empty, I leaved them since most where commented.

I've noticed that they are all declared virtual, but there are no virtual method in any class or any subclass.
Is there a reason? Otherwise we could also remove the virtual identifier.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.312% when pulling 1fd3227 on fekir:clean_destructors into 926ebda on SRombauts:master.

@SRombauts SRombauts merged commit 5479cc0 into SRombauts:master Aug 22, 2017
@SRombauts
Copy link
Owner

Thanks!

@SRombauts
Copy link
Owner

Virtual dtor are there so that you can specialize any class, but I am now unsure if it have any meaning.
Perhap's did I leave a clue in the git log when I added those "virtual" and the comments about "no virtual dtor needed here" ?

I would need to dive into this specific subject to be certain, but I lack the time right now. If you want to look at this, and have a discussion about it, feel free!

@SRombauts SRombauts self-assigned this Aug 22, 2017
@fekir
Copy link
Contributor Author

fekir commented Aug 22, 2017

I gave a quick look at git log, the Database class destructor has been virtual from it's first commit (commit 733c92e), and the Ptr class always had that comment (commit 1a82510).

I do not think that you can specialize anything since there are no virtual methods.
I am not a big fan of class hierarchies, thats why I immediately noticed the "virtual" keyword.

Since no one used it till today, I think there is no need for it.

Should we maybe move the discussion to a separate issue?

@SRombauts
Copy link
Owner

Thanks for looking at it. I fell like you (now) about class hierarchy, I may have been otherwise at that time..

So yes you can remove it, I will make sure to mention it on the changelog since it may break someone else code in a subtle way.

@fekir fekir deleted the clean_destructors branch August 22, 2017 16:25
@fekir fekir restored the clean_destructors branch August 22, 2017 16:26
@fekir
Copy link
Contributor Author

fekir commented Aug 22, 2017

I've pushed my changes to my branch "clean_destructors" (I accidentally deleted it, but was able to restore it).

Are you able to merge it again or do I need to make a new pull request?
It seems I need to do a new since the other time I've updated the branch (before you merged it back), the ci system build everything again, and it does not seem to happen now.

I hope it is possible to make a request for the same branch again...

@SRombauts
Copy link
Owner

You can probably make a new merge request, but this one cannot be re-used for another purpose.

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

Successfully merging this pull request may close these issues.

3 participants