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

Side by Side Diff: mojo/public/cpp/bindings/lib/array_serialization.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, 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_BINDINGS_LIB_ARRAY_SERIALIZATION_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_SERIALIZATION_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_SERIALIZATION_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_SERIALIZATION_H_
7 7
8 #include <string.h> // For |memcpy()|. 8 #include <string.h> // For |memcpy()|.
9 9
10 #include <vector> 10 #include <vector>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 internal::Array_Data<F>* result = 237 internal::Array_Data<F>* result =
238 internal::Array_Data<F>::New(input.size(), buf); 238 internal::Array_Data<F>::New(input.size(), buf);
239 if (result) { 239 if (result) {
240 internal::ArraySerializer<E, F>::template SerializeElements< 240 internal::ArraySerializer<E, F>::template SerializeElements<
241 ValidateParams::element_is_nullable, 241 ValidateParams::element_is_nullable,
242 typename ValidateParams::ElementValidateParams>( 242 typename ValidateParams::ElementValidateParams>(
243 internal::Forward(input), buf, result); 243 internal::Forward(input), buf, result);
244 } 244 }
245 *output = result; 245 *output = result;
246 } else { 246 } else {
247 *output = NULL; 247 *output = nullptr;
248 } 248 }
249 } 249 }
250 250
251 template <typename E, typename F> 251 template <typename E, typename F>
252 inline void Deserialize_(internal::Array_Data<F>* input, Array<E>* output) { 252 inline void Deserialize_(internal::Array_Data<F>* input, Array<E>* output) {
253 if (input) { 253 if (input) {
254 internal::ArraySerializer<E, F>::DeserializeElements(input, output); 254 internal::ArraySerializer<E, F>::DeserializeElements(input, output);
255 } else { 255 } else {
256 output->reset(); 256 output->reset();
257 } 257 }
258 } 258 }
259 259
260 } // namespace mojo 260 } // namespace mojo
261 261
262 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_SERIALIZATION_H_ 262 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ARRAY_SERIALIZATION_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/array_internal.h ('k') | mojo/public/cpp/bindings/lib/bindings_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698