--- parser3/src/include/pa_array.h 2024/10/07 23:46:24 1.97 +++ parser3/src/include/pa_array.h 2024/10/26 18:53:37 1.99 @@ -8,7 +8,7 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H -#define IDENT_PA_ARRAY_H "$Id: pa_array.h,v 1.97 2024/10/07 23:46:24 moko Exp $" +#define IDENT_PA_ARRAY_H "$Id: pa_array.h,v 1.99 2024/10/26 18:53:37 moko Exp $" // includes @@ -108,14 +108,11 @@ public: } /// append other Array portion to this one. starting from offset - Array& append(const Array& src, - size_t offset=0, - size_t limit=ARRAY_OPTION_LIMIT_ALL) { //< zero limit means 'nothing' - + void append(const Array& src, size_t offset=0, size_t limit=ARRAY_OPTION_LIMIT_ALL) { //< zero limit means 'nothing' size_t src_count=src.count(); // skip tivials if(!src_count || !limit || offset>=src_count) - return *this; + return; // max(limit) size_t m=src_count-offset; // fix limit @@ -123,13 +120,8 @@ public: limit=m; fit(fsize-1+limit); - - T* from=&src.felements[offset]; - T* to=&felements[fsize]; - for(T* from_end=from+limit; from= fallocated) - resize(max(this->fallocated + this->fallocated/4, index+1)); + resize(max(fallocated+fallocated/4, index+1)); } void resize(size_t asize) {