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

Removing pointless null-pointer tests for objects created with new #1365

Merged
merged 1 commit into from Jul 23, 2015

Conversation

Projects
None yet
2 participants
@Areloch
Contributor

Areloch commented Jul 22, 2015

Issue found with PVS-Studio:

Many instances where we would create a object via a new call, and then check that it was non-null.

This is redundant, as if we ever were in a situation where new failed, we'd be crashing left and right already, so the additional check is wasted processing.

Issue found with PVS-Studio:
Many instances where we would create a object via a new call, and then check that it was non-null.

This is redundant, as if we ever were in a situation where new failed, we'd be crashing left and right already, so the additional check is wasted processing.

@Areloch Areloch added this to the 3.8 milestone Jul 22, 2015

@Areloch Areloch added the Defect label Jul 22, 2015

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Jul 22, 2015

Contributor

More info. Looks good to me. Will test later.

Contributor

crabmusket commented Jul 22, 2015

More info. Looks good to me. Will test later.

crabmusket added a commit that referenced this pull request Jul 23, 2015

Merge pull request #1365 from Areloch/PVS_Cleanup_668
Removing pointless null-pointer tests for objects created with new

@crabmusket crabmusket merged commit b940c9e into GarageGames:development Jul 23, 2015

@Areloch Areloch deleted the Areloch:PVS_Cleanup_668 branch Jun 23, 2017

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