| Index: cc/own_ptr_vector.h
|
| diff --git a/cc/own_ptr_vector.h b/cc/own_ptr_vector.h
|
| index 196f82107e565c680dc4c9424181b6700c213ebd..4e592ee7d70183667ce7e3ca2df164442b8e9ec9 100644
|
| --- a/cc/own_ptr_vector.h
|
| +++ b/cc/own_ptr_vector.h
|
| @@ -6,6 +6,7 @@
|
| #define CC_OWN_PTR_VECTOR_H_
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/logging.h"
|
| #include "base/stl_util.h"
|
| #include <wtf/PassOwnPtr.h>
|
| #include <wtf/OwnPtr.h>
|
| @@ -32,7 +33,7 @@ class OwnPtrVector {
|
| }
|
|
|
| T* Peek(size_t index) const {
|
| - ASSERT(index < size());
|
| + DCHECK(index < size());
|
| return data_[index];
|
| }
|
|
|
| @@ -41,12 +42,12 @@ class OwnPtrVector {
|
| }
|
|
|
| T* first() const {
|
| - ASSERT(!isEmpty());
|
| + DCHECK(!isEmpty());
|
| return Peek(0);
|
| }
|
|
|
| T* last() const {
|
| - ASSERT(!isEmpty());
|
| + DCHECK(!isEmpty());
|
| return Peek(size() - 1);
|
| }
|
|
|
| @@ -55,14 +56,14 @@ class OwnPtrVector {
|
| }
|
|
|
| PassOwnPtr<T> take(size_t index) {
|
| - ASSERT(index < size());
|
| + DCHECK(index < size());
|
| OwnPtr<T> ret = adoptPtr(data_[index]);
|
| data_[index] = NULL;
|
| return ret.release();
|
| }
|
|
|
| void remove(size_t index) {
|
| - ASSERT(index < size());
|
| + DCHECK(index < size());
|
| delete data_[index];
|
| data_.erase(data_.begin() + index);
|
| }
|
| @@ -76,7 +77,7 @@ class OwnPtrVector {
|
| }
|
|
|
| void insert(size_t index, PassOwnPtr<T> item) {
|
| - ASSERT(index < size());
|
| + DCHECK(index < size());
|
| data_.insert(data_.begin() + index, item.leakPtr());
|
| }
|
|
|
|
|