Diff for /parser3/src/include/pa_array.h between versions 1.77 and 1.79

version 1.77, 2009/04/30 04:39:06 version 1.79, 2009/05/23 04:29:18
Line 95  public: Line 95  public:
         /// append to array          /// append to array
         inline Array& operator+=(T src) {          inline Array& operator+=(T src) {
                 if(is_full())                  if(is_full())
                         expand(fallocated>0?2:3); // 3 is PAF default, confirmed by tests                          expand(fallocated>0? 2+fallocated/32 : 3); // 3 is PAF default, confirmed by tests
   
                 felements[fused++]=src;                  felements[fused++]=src;
   
Line 208  protected: Line 208  protected:
                 if(fallocated){                  if(fallocated){
                         size_t new_allocated=fallocated+delta;                          size_t new_allocated=fallocated+delta;
                         felements=(T *)pa_realloc(felements, new_allocated*sizeof(T));                          felements=(T *)pa_realloc(felements, new_allocated*sizeof(T));
                         memset(&felements[fallocated], 0, delta*sizeof(T));  
                         fallocated=new_allocated;                          fallocated=new_allocated;
                 } else {                  } else {
                         fallocated=delta;                          fallocated=delta;

Removed from v.1.77  
changed lines
  Added in v.1.79


E-mail: