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

Unified Diff: cc/base/scoped_ptr_hash_map.h

Issue 16355009: Rewrite scoped_ptr<T>(NULL) to use the default ctor in cc/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix most vexing parse Created 7 years, 6 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
« no previous file with comments | « no previous file | cc/base/scoped_ptr_vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/scoped_ptr_hash_map.h
diff --git a/cc/base/scoped_ptr_hash_map.h b/cc/base/scoped_ptr_hash_map.h
index 49421c3ca12b1ad501c83a23c2f8195c251ae0da..47135822d2da78eb55e545e194d225631307d2b0 100644
--- a/cc/base/scoped_ptr_hash_map.h
+++ b/cc/base/scoped_ptr_hash_map.h
@@ -73,7 +73,7 @@ class ScopedPtrHashMap {
scoped_ptr<Value> take(iterator it) {
DCHECK(it != data_.end());
if (it == data_.end())
- return scoped_ptr<Value>(NULL);
+ return scoped_ptr<Value>();
Key key = it->first;
scoped_ptr<Value> ret(it->second);
@@ -85,7 +85,7 @@ class ScopedPtrHashMap {
scoped_ptr<Value> take(const Key& k) {
iterator it = find(k);
if (it == data_.end())
- return scoped_ptr<Value>(NULL);
+ return scoped_ptr<Value>();
return take(it);
}
@@ -93,7 +93,7 @@ class ScopedPtrHashMap {
scoped_ptr<Value> take_and_erase(iterator it) {
DCHECK(it != data_.end());
if (it == data_.end())
- return scoped_ptr<Value>(NULL);
+ return scoped_ptr<Value>();
scoped_ptr<Value> ret(it->second);
data_.erase(it);
@@ -103,7 +103,7 @@ class ScopedPtrHashMap {
scoped_ptr<Value> take_and_erase(const Key& k) {
iterator it = find(k);
if (it == data_.end())
- return scoped_ptr<Value>(NULL);
+ return scoped_ptr<Value>();
return take_and_erase(it);
}
« no previous file with comments | « no previous file | cc/base/scoped_ptr_vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698