Dick Hollenbeck wrote:
> //C++ guarantees that operator delete checks its argument for null-ness
> #ifndef SAFE_DELETE
> #define SAFE_DELETE( p ) delete (p); (p) = NULL;
> #endif
[...]
> 3) why cannot i put it after an if() statement (trick question)?
BTW, do you know this trick to make multiple statements in a macro
if-safe ?
#define MACRO do { ...stuff... } while (0)
BTW2, wxDELETE is better, but still not safe with else. At
least you'd get a warning.
4) What problem - real or imagined - is the #ifdef masking ?
> I don't like it.
Looks fishy indeed.
- Werner
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp