Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2698)

Unified Diff: cc/own_ptr_vector.h

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/own_ptr_vector.h
diff --git a/cc/own_ptr_vector.h b/cc/own_ptr_vector.h
index 196f82107e565c680dc4c9424181b6700c213ebd..69aa6270f83037b3cfecef83ead5d47ec3329d0c 100644
--- a/cc/own_ptr_vector.h
+++ b/cc/own_ptr_vector.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/stl_util.h"
+#include "cc/dcheck.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/OwnPtr.h>
@@ -32,7 +33,7 @@ class OwnPtrVector {
}
T* Peek(size_t index) const {
- ASSERT(index < size());
+ CC_DCHECK(index < size());
return data_[index];
}
@@ -41,12 +42,12 @@ class OwnPtrVector {
}
T* first() const {
- ASSERT(!isEmpty());
+ CC_DCHECK(!isEmpty());
return Peek(0);
}
T* last() const {
- ASSERT(!isEmpty());
+ CC_DCHECK(!isEmpty());
return Peek(size() - 1);
}
@@ -55,14 +56,14 @@ class OwnPtrVector {
}
PassOwnPtr<T> take(size_t index) {
- ASSERT(index < size());
+ CC_DCHECK(index < size());
OwnPtr<T> ret = adoptPtr(data_[index]);
data_[index] = NULL;
return ret.release();
}
void remove(size_t index) {
- ASSERT(index < size());
+ CC_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());
+ CC_DCHECK(index < size());
data_.insert(data_.begin() + index, item.leakPtr());
}
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | cc/platform_color.h » ('j') | cc/yuv_video_draw_quad.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698