| Index: src/list-inl.h
|
| diff --git a/src/list-inl.h b/src/list-inl.h
|
| index 1b687b6a960e1b3f499d85dcede3c0e43c82545c..60e8fab6f6fb5196aa6c500e0fd3d7dfd948505a 100644
|
| --- a/src/list-inl.h
|
| +++ b/src/list-inl.h
|
| @@ -50,7 +50,7 @@ void List<T, P>::ResizeAdd(const T& element, P alloc) {
|
|
|
| template<typename T, class P>
|
| void List<T, P>::ResizeAddInternal(const T& element, P alloc) {
|
| - ASSERT(length_ >= capacity_);
|
| + DCHECK(length_ >= capacity_);
|
| // Grow the list capacity by 100%, but make sure to let it grow
|
| // even when the capacity is zero (possible initial case).
|
| int new_capacity = 1 + 2 * capacity_;
|
| @@ -64,7 +64,7 @@ void List<T, P>::ResizeAddInternal(const T& element, P alloc) {
|
|
|
| template<typename T, class P>
|
| void List<T, P>::Resize(int new_capacity, P alloc) {
|
| - ASSERT_LE(length_, new_capacity);
|
| + DCHECK_LE(length_, new_capacity);
|
| T* new_data = NewData(new_capacity, alloc);
|
| MemCopy(new_data, data_, length_ * sizeof(T));
|
| List<T, P>::DeleteData(data_);
|
| @@ -83,14 +83,14 @@ Vector<T> List<T, P>::AddBlock(T value, int count, P alloc) {
|
|
|
| template<typename T, class P>
|
| void List<T, P>::Set(int index, const T& elm) {
|
| - ASSERT(index >= 0 && index <= length_);
|
| + DCHECK(index >= 0 && index <= length_);
|
| data_[index] = elm;
|
| }
|
|
|
|
|
| template<typename T, class P>
|
| void List<T, P>::InsertAt(int index, const T& elm, P alloc) {
|
| - ASSERT(index >= 0 && index <= length_);
|
| + DCHECK(index >= 0 && index <= length_);
|
| Add(elm, alloc);
|
| for (int i = length_ - 1; i > index; --i) {
|
| data_[i] = data_[i - 1];
|
| @@ -144,7 +144,7 @@ void List<T, P>::Clear() {
|
|
|
| template<typename T, class P>
|
| void List<T, P>::Rewind(int pos) {
|
| - ASSERT(0 <= pos && pos <= length_);
|
| + DCHECK(0 <= pos && pos <= length_);
|
| length_ = pos;
|
| }
|
|
|
| @@ -195,7 +195,7 @@ void List<T, P>::Sort(int (*cmp)(const T* x, const T* y)) {
|
| ToVector().Sort(cmp);
|
| #ifdef DEBUG
|
| for (int i = 1; i < length_; i++)
|
| - ASSERT(cmp(&data_[i - 1], &data_[i]) <= 0);
|
| + DCHECK(cmp(&data_[i - 1], &data_[i]) <= 0);
|
| #endif
|
| }
|
|
|
| @@ -208,7 +208,7 @@ void List<T, P>::Sort() {
|
|
|
| template<typename T, class P>
|
| void List<T, P>::Initialize(int capacity, P allocator) {
|
| - ASSERT(capacity >= 0);
|
| + DCHECK(capacity >= 0);
|
| data_ = (capacity > 0) ? NewData(capacity, allocator) : NULL;
|
| capacity_ = capacity;
|
| length_ = 0;
|
|
|