Rev 7886 | Rev 7972 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7886 | Rev 7930 | ||
---|---|---|---|
Line 98... | Line 98... | ||
98 | dword buf_size; |
98 | dword buf_size; |
99 | unsigned count; |
99 | unsigned count; |
100 | void alloc(); |
100 | void alloc(); |
101 | void add(); |
101 | void add(); |
102 | dword get(); |
102 | dword get(); |
- | 103 | dword len(); |
|
103 | dword get_last(); |
104 | dword get_last(); |
104 | void pop(); |
105 | void pop(); |
105 | void drop(); |
106 | void drop(); |
106 | }; |
107 | }; |
Line 125... | Line 126... | ||
125 | :dword collection_int::get(dword pos) { |
126 | :dword collection_int::get(dword pos) { |
126 | if (pos<0) || (pos>=count) return 0; |
127 | if (pos<0) || (pos>=count) return 0; |
127 | return ESDWORD[pos * sizeof(dword) + buf]; |
128 | return ESDWORD[pos * sizeof(dword) + buf]; |
128 | } |
129 | } |
Line -... | Line 130... | ||
- | 130 | ||
- | 131 | :dword collection_int::len(dword pos) { |
|
- | 132 | if (pos<0) || (pos+1>=count) return 0; |
|
- | 133 | return get(pos+1) - get(pos); |
|
- | 134 | } |
|
129 | 135 | ||
130 | :dword collection_int::get_last() { |
136 | :dword collection_int::get_last() { |
131 | return get(count-1); |
137 | return get(count-1); |
Line 132... | Line 138... | ||
132 | } |
138 | } |