Changeset 262 for trunk/VUT/GtpVisibilityPreprocessor/src/common.h
- Timestamp:
- 09/09/05 15:03:48 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/common.h
r261 r262 128 128 129 129 #ifndef DEL_PTR 130 #define DEL_PTR(ptr) while (0) {if (ptr) {delete (ptr); (ptr) = NULL;}} 131 #endif 132 130 #define DEL_PTR(ptr) do {if (ptr) { \ 131 delete (ptr); \ 132 (ptr) = 0;}} \ 133 while (0) 134 #endif 135 // Clears a container (i.e., a vector of pointers) and deletes the pointers 133 136 #ifndef CLEAR_CONTAINER 134 #define CLEAR_CONTAINER(co) while (!co.empty()) {delete co.back(); co.pop_back();} 137 #define CLEAR_CONTAINER(co) do { while (!(co).empty()) { \ 138 DEL_PTR((co).back()); \ 139 (co).pop_back();}} \ 140 while (0) 135 141 #endif 136 142
Note: See TracChangeset
for help on using the changeset viewer.