-
Notifications
You must be signed in to change notification settings - Fork 84
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 an unnecessary null pointer check #6
Comments
Thanks. This isn't my code, I copied it from another project, but it's easy to change. I'm not sure if there are any more of these or how to find them. |
How do you think about to use a development tool like “clang-tidy” for corresponding source code adjustments? |
Thanks, I'll look into this. There seems to be an option to run this in Visual Studio. |
Thanks for your small source code improvement. |
I removed the setting of triIndex back to NULL. I'm not sure it really matters. Sometimes it's useful to leave that in because it causes less trouble if that class is used after free. I have code like that to check for use-after-free in my universe ship logic, which has quite a complex object ownership/reference counting system due to the reference cycles between ships. |
An extra null pointer check is not needed in a function like the destructor for the class “VertData”.
The text was updated successfully, but these errors were encountered: