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

Side by Side Diff: mojo/public/cpp/system/buffer.h

Issue 612243002: Mojo: NULL -> nullptr in mojo/public/cpp outside of bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_ 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_
6 #define MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_ 6 #define MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_
7 7
8 #include <assert.h> 8 #include <assert.h>
9 9
10 #include "mojo/public/c/system/buffer.h" 10 #include "mojo/public/c/system/buffer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 explicit SharedBuffer(uint64_t num_bytes); 86 explicit SharedBuffer(uint64_t num_bytes);
87 SharedBuffer(uint64_t num_bytes, 87 SharedBuffer(uint64_t num_bytes,
88 const MojoCreateSharedBufferOptions& options); 88 const MojoCreateSharedBufferOptions& options);
89 ~SharedBuffer(); 89 ~SharedBuffer();
90 90
91 ScopedSharedBufferHandle handle; 91 ScopedSharedBufferHandle handle;
92 }; 92 };
93 93
94 inline SharedBuffer::SharedBuffer(uint64_t num_bytes) { 94 inline SharedBuffer::SharedBuffer(uint64_t num_bytes) {
95 MojoResult result MOJO_ALLOW_UNUSED = 95 MojoResult result MOJO_ALLOW_UNUSED =
96 CreateSharedBuffer(NULL, num_bytes, &handle); 96 CreateSharedBuffer(nullptr, num_bytes, &handle);
97 assert(result == MOJO_RESULT_OK); 97 assert(result == MOJO_RESULT_OK);
98 } 98 }
99 99
100 inline SharedBuffer::SharedBuffer( 100 inline SharedBuffer::SharedBuffer(
101 uint64_t num_bytes, 101 uint64_t num_bytes,
102 const MojoCreateSharedBufferOptions& options) { 102 const MojoCreateSharedBufferOptions& options) {
103 MojoResult result MOJO_ALLOW_UNUSED = 103 MojoResult result MOJO_ALLOW_UNUSED =
104 CreateSharedBuffer(&options, num_bytes, &handle); 104 CreateSharedBuffer(&options, num_bytes, &handle);
105 assert(result == MOJO_RESULT_OK); 105 assert(result == MOJO_RESULT_OK);
106 } 106 }
107 107
108 inline SharedBuffer::~SharedBuffer() { 108 inline SharedBuffer::~SharedBuffer() {
109 } 109 }
110 110
111 } // namespace mojo 111 } // namespace mojo
112 112
113 #endif // MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_ 113 #endif // MOJO_PUBLIC_CPP_SYSTEM_BUFFER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/tests/logging_unittest.cc ('k') | mojo/public/cpp/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698