Changeset 13327


Ignore:
Timestamp:
09/11/12 14:12:03 (13 years ago)
Author:
utke
Message:

CHG fix up the assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h

    r13312 r13327  
    3737#ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
    3838  T* buf=new T[dim1*dim2];
     39  assert(buf );
    3940  T** aT_pp =new T*[dim1];
     41  assert(aT_pp );
    4042  for (unsigned int i=0;i<dim1;++i) {
    4143    aT_pp [i]=buf;
    4244    buf+=dim2;
    4345  }
    44   assert(aT_pp );
    4546  return aT_pp ;
    4647#else
    4748  T* buf=(T*)malloc(dim1*dim2*sizeof(T));
     49  assert(buf );
    4850  T** aT_pp =(T**)malloc(dim1*sizeof(T*));
     51  assert(aT_pp );
    4952  for (unsigned int i=0;i<dim1;++i) {
    5053    aT_pp [i]=buf;
    5154    buf+=dim2;
    5255  }
    53   assert(aT_pp );
    5456  return aT_pp ;
    5557#endif
Note: See TracChangeset for help on using the changeset viewer.