* Make the SAFE_DELETE syntactically safe.
This commit is contained in:
jean.chalard
2009-09-05 11:34:51 +00:00
parent 380014b2a6
commit 44738399dc

View File

@@ -51,7 +51,7 @@
#define RAD2DEG 57.29577951f
#define DEG2RAD 0.017453293f
#define SAFE_DELETE(x) if (x) { delete x; x = NULL; }
#define SAFE_DELETE(x) do { if (x) { delete x; x = NULL; } } while(false)
#define SAFE_DELETE_ARRAY(x) if (x) { delete [] x; x = NULL; }