Skip to content

COMP: Add nullptr instead of NULL or 0

Hans Johnson requested to merge hjmjohnson/vtk:SetNullPtr into master

https://stackoverflow.com/questions/13816385/what-are-the-advantages-of-using-nullptr C++11 introduces nullptr, it is known as the Null pointer constant and It improves type safety and resolves ambiguous situations unlike the existing implementation dependent null pointer constant NULL.

https://msdn.microsoft.com/en-us/library/4ex65770.aspx The nullptr keyword can be used to test if a pointer or handle reference is null before the reference is used. Function calls among languages that use null pointer values for error checking should be interpreted correctly. You cannot initialize a handle to zero; only nullptr can be used.

Merge request reports