|
|
| version 1.94, 2024/09/16 23:22:52 | version 1.95, 2024/09/21 23:51:04 |
|---|---|
| Line 53 public: | Line 53 public: |
| bool defined; | bool defined; |
| Action_options( | Action_options( |
| size_t aoffset=0, | size_t aoffset=0, |
| size_t alimit=ARRAY_OPTION_LIMIT_ALL, | size_t alimit=ARRAY_OPTION_LIMIT_ALL, |
| bool areverse=false): | bool areverse=false): |
| offset(aoffset), limit(alimit), reverse(areverse), | offset(aoffset), limit(alimit), reverse(areverse), |
| defined(false) {} | defined(false) {} |
| Line 71 public: | Line 71 public: |
| if(!m) | if(!m) |
| return false; | return false; |
| // fix limit | // fix limit |
| if(limit==ARRAY_OPTION_LIMIT_ALL || limit>m) | if(limit>m) |
| limit=m; | limit=m; |
| return true; | return true; |
| Line 110 public: | Line 110 public: |
| /// append other Array portion to this one. starting from offset | /// append other Array portion to this one. starting from offset |
| Array& append(const Array& src, | Array& append(const Array& src, |
| size_t offset=0, | size_t offset=0, |
| size_t limit=ARRAY_OPTION_LIMIT_ALL) { //< negative limit means 'all'. zero limit means 'nothing' | size_t limit=ARRAY_OPTION_LIMIT_ALL) { //< zero limit means 'nothing' |
| size_t src_count=src.count(); | size_t src_count=src.count(); |
| // skip tivials | // skip tivials |
| Line 119 public: | Line 119 public: |
| // max(limit) | // max(limit) |
| size_t m=src_count-offset; | size_t m=src_count-offset; |
| // fix limit | // fix limit |
| if(limit==ARRAY_OPTION_LIMIT_ALL || limit>m) | if(limit>m) |
| limit=m; | limit=m; |
| fit(fsize-1+limit); | fit(fsize-1+limit); |