26 Jun
2011
26 Jun
'11
9:02 p.m.
On 26-6-2011 0:22, Jon Cruz wrote:
One is with the use of "NULL". That is more of a C macro that in C++ has be replaced with the simple use of "0". I've looked into this point with coworkers and others at various points, and can try to dig up more details if you need them.
I think I like the use of "NULL" much more than "0", as it more clearly indicates the type.
Consider this code example of initializing variables: box->persp_href = 0; compared with box->persp_href = NULL;
I think the second version is clearer about what is being done. (the first looks like the number of refs is set to zero, instead of initializing a ref pointer
Ciao, Johan