Ignore:
Timestamp:
09/09/05 15:03:48 (19 years ago)
Author:
mattausch
Message:

debugged bsp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/common.h

    r261 r262  
    128128 
    129129#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 
    133136#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) 
    135141#endif 
    136142 
Note: See TracChangeset for help on using the changeset viewer.