• Home
  • Raw
  • Download

Lines Matching refs:size_

150   UniqueSet() : size_(0), capacity_(0), array_(NULL) { }  in UniqueSet()
154 : size_(0), capacity_(capacity), in UniqueSet()
161 : size_(1), capacity_(1), array_(zone->NewArray<Unique<T> >(1)) { in UniqueSet()
169 for (int i = 0; i < size_; i++) { in Add()
173 Grow(size_ + 1, zone); in Add()
174 for (int j = size_ - 1; j >= i; j--) array_[j + 1] = array_[j]; in Add()
176 size_++; in Add()
181 Grow(size_ + 1, zone); in Add()
182 array_[size_++] = uniq; in Add()
187 for (int i = 0; i < size_; i++) { in Remove()
189 while (++i < size_) array_[i - 1] = array_[i]; in Remove()
190 size_--; in Remove()
198 if (that->size_ != this->size_) return false; in Equals()
199 for (int i = 0; i < this->size_; i++) { in Equals()
209 for (int i = 0; i < this->size_; ++i) { in Contains()
220 if (that->size_ < this->size_) return false; in IsSubset()
222 for (int i = 0; i < this->size_; i++) { in IsSubset()
227 if ((this->size_ - i) > (that->size_ - j)) return false; in IsSubset()
236 if (that->size_ == 0 || this->size_ == 0) return new(zone) UniqueSet<T>(); in Intersect()
239 Min(this->size_, that->size_), zone); in Intersect()
242 while (i < this->size_ && j < that->size_) { in Intersect()
256 out->size_ = k; in Intersect()
263 if (that->size_ == 0) return this->Copy(zone); in Union()
264 if (this->size_ == 0) return that->Copy(zone); in Union()
267 this->size_ + that->size_, zone); in Union()
270 while (i < this->size_ && j < that->size_) { in Union()
286 while (i < this->size_) out->array_[k++] = this->array_[i++]; in Union()
287 while (j < that->size_) out->array_[k++] = that->array_[j++]; in Union()
289 out->size_ = k; in Union()
296 if (that->size_ == 0) return this->Copy(zone); in Subtract()
298 UniqueSet<T>* out = new(zone) UniqueSet<T>(this->size_, zone); in Subtract()
301 while (i < this->size_) { in Subtract()
309 out->size_ = j; in Subtract()
315 UniqueSet<T>* copy = new(zone) UniqueSet<T>(this->size_, zone); in Copy()
316 copy->size_ = this->size_; in Copy()
317 memcpy(copy->array_, this->array_, this->size_ * sizeof(Unique<T>)); in Copy()
322 size_ = 0; in Clear()
326 return size_; in size()
330 DCHECK(index >= 0 && index < size_); in at()
339 uint16_t size_; variable
350 if (size_ > 0) { in Grow()
351 memcpy(new_array, array_, size_ * sizeof(Unique<T>)); in Grow()