| OLD | NEW |
| 1 {%- import "struct_macros.tmpl" as struct_macros %} | 1 {%- import "struct_macros.tmpl" as struct_macros %} |
| 2 {%- set mojom_type = struct|get_qualified_name_for_kind %} | 2 {%- set mojom_type = struct|get_qualified_name_for_kind %} |
| 3 | 3 |
| 4 // static | 4 // static |
| 5 bool StructTraits<{{mojom_type}}::DataView, {{mojom_type}}Ptr>::Read( | 5 bool StructTraits<{{mojom_type}}::DataView, {{mojom_type}}Ptr>::Read( |
| 6 {{mojom_type}}::DataView input, | 6 {{mojom_type}}::DataView input, |
| 7 {{mojom_type}}Ptr* output) { | 7 {{mojom_type}}Ptr* output) { |
| 8 bool success = true; | 8 bool success = true; |
| 9 {{mojom_type}}Ptr result({{mojom_type}}::New()); | 9 {{mojom_type}}Ptr result({{mojom_type}}::New()); |
| 10 {{struct_macros.deserialize(struct, "input", "result->%s", | 10 {{struct_macros.deserialize(struct, "input", "result->%s", |
| 11 "success")|indent(4)}} | 11 "success")|indent(4)}} |
| 12 *output = std::move(result); | 12 *output = std::move(result); |
| 13 return success; | 13 return success; |
| 14 } | 14 } |
| OLD | NEW |