hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
866 stars 200 forks source link

Remove unnecessary null pointer checks #1

Closed elfring closed 9 years ago

elfring commented 9 years ago

Extra null pointer checks are not needed in functions like the following.

hughperkins commented 9 years ago

Hi Markus,

Ok, you're saying that if the pointer is incorrectly non-zero, then the if check for zero wont prevent the program crashing, and if it is zero, then the delete will work anyway?

Ok, sounds reasonable. Can you submit a Pull Request please?

Hugh

hughperkins commented 9 years ago

Hi. I guess this 'issue' is mostly to try to get publicity for your 'cppcheck' project, rather than because you actually want to fix this, is that right? :-P

I'm going to close this issue, because I quite like the null checks actually. But if you submit a pull request for this, I will accept it :-)