Lines Matching refs:new_capacity
107 size_t new_capacity = capacity_;
108 while (new_capacity < new_size)
109 new_capacity += (new_capacity >> 1) + 8;
111 Reserve(new_capacity);
117 void String::Reserve(size_t new_capacity) {
118 str_ = reinterpret_cast<char*>(::realloc(str_, new_capacity + 1));
119 if (new_capacity > capacity_)
120 ::memset(str_ + capacity_, '\0', new_capacity - capacity_);
121 capacity_ = new_capacity;