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

Unified Diff: mojo/public/cpp/bindings/struct_ptr.h

Issue 613053002: Mojo: NULL -> nullptr in mojo/public/cpp/bindings and also for the bindings generator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « mojo/public/cpp/bindings/no_interface.h ('k') | mojo/public/cpp/bindings/tests/buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/struct_ptr.h
diff --git a/mojo/public/cpp/bindings/struct_ptr.h b/mojo/public/cpp/bindings/struct_ptr.h
index 12ec13533c51c96478b88fd91cfe97e8f834dca3..58b6cec87f9c1d96d1ed9101eac7835c70a22f4d 100644
--- a/mojo/public/cpp/bindings/struct_ptr.h
+++ b/mojo/public/cpp/bindings/struct_ptr.h
@@ -28,12 +28,12 @@ class StructPtr {
public:
typedef typename Struct::Data_ Data_;
- StructPtr() : ptr_(NULL) {}
+ StructPtr() : ptr_(nullptr) {}
~StructPtr() {
delete ptr_;
}
- StructPtr(RValue other) : ptr_(NULL) { Take(other.object); }
+ StructPtr(RValue other) : ptr_(nullptr) { Take(other.object); }
StructPtr& operator=(RValue other) {
Take(other.object);
return *this;
@@ -47,11 +47,11 @@ class StructPtr {
void reset() {
if (ptr_) {
delete ptr_;
- ptr_ = NULL;
+ ptr_ = nullptr;
}
}
- bool is_null() const { return ptr_ == NULL; }
+ bool is_null() const { return ptr_ == nullptr; }
Struct& operator*() const {
MOJO_DCHECK(ptr_);
« no previous file with comments | « mojo/public/cpp/bindings/no_interface.h ('k') | mojo/public/cpp/bindings/tests/buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698