Closed elfring closed 4 years ago
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”.