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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl

Issue 2112093002: Mojo C++ bindings: Merge EncodePointers/DecodePointers into Serialize/Deserialize, respectively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@61_array_fix
Patch Set: . Created 4 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
Index: mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
index 78bb4322b12cba54bbc8473aba7737e32d3ac1dc..7c3493924c0ac94024f1ef2951cefa250cad8411 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
@@ -13,9 +13,9 @@ class {{struct.name}}DataView {
bool Read{{name|under_to_camel}}(UserType* value) {
{%- if pf.min_version != 0 %}
auto pointer = data_->header_.version >= {{pf.min_version}}
- ? data_->{{name}}.ptr : nullptr;
+ ? data_->{{name}}.Get() : nullptr;
{%- else %}
- auto pointer = data_->{{name}}.ptr;
+ auto pointer = data_->{{name}}.Get();
{%- endif %}
return mojo::internal::Deserialize<{{kind|unmapped_type_for_serializer}}>(
pointer, value, context_);

Powered by Google App Engine
This is Rietveld 408576698