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 unnecessary null pointer checks #9

Closed
elfring opened this issue Apr 22, 2014 · 2 comments
Closed

Remove unnecessary null pointer checks #9

elfring opened this issue Apr 22, 2014 · 2 comments

Comments

@elfring
Copy link

elfring commented Apr 22, 2014

An extra null pointer check is not needed in functions like the following.

@elfring
Copy link
Author

elfring commented Nov 14, 2015

How do you think about to improve the affected source code?

@mercere99
Copy link
Member

I agree completely with the removal of the null checks. At the time I originally wrote this code, I hadn't realized that it was safe to delete null pointers (or rather, that delete always performs this check).

http://stackoverflow.com/questions/4190703/is-it-safe-to-delete-a-null-pointer

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