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

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

Issue 1833033003: C++ Bindings: Remove 'inline' arg from generated union serialization functions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
index c0b79e6e22c1c89ca25535ef60c1fb98cd479f3c..c8aa000b6bf7317e15056e936ab68158eab590bc 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
@@ -15,7 +15,7 @@
size_t size = sizeof(internal::{{struct.name}}_Data);
{%- for pf in struct.packed.packed_fields_in_ordinal_order if pf.field.kind|is_object_kind %}
{%- if pf.field.kind|is_union_kind %}
- size += GetSerializedSize_({{input_field_pattern|format(pf.field.name)}}, true);
+ size += GetSerializedSize_({{input_field_pattern|format(pf.field.name)}});
{%- elif pf.field.kind|is_struct_kind %}
size += {{input_field_pattern|format(pf.field.name)}}.is_null()
? 0
@@ -76,16 +76,14 @@
}
{%- endmacro -%}
-{%- macro call_serialize_union(input, buffer, output, inlined,
- should_return_errors) -%}
+{%- macro call_serialize_union(input, buffer, output, should_return_errors) -%}
{
{%- if should_return_errors %}
auto retval =
{%- endif %}
SerializeUnion_({{input}},
{{buffer}},
- {{output}},
- {{inlined}});
+ {{output}});
{%- if should_return_errors %}
if (retval != mojo::internal::ValidationError::NONE)
return retval;
@@ -157,7 +155,6 @@
{{call_serialize_union(input = input_field ~ ".get()",
buffer = buffer,
output = "&%s_ptr"|format(name),
- inlined = "true",
should_return_errors = should_return_errors)}}
{%- elif kind|is_string_kind %}
SerializeString_({{input_field}}, {{buffer}}, &{{output}}->{{name}}.ptr);

Powered by Google App Engine
This is Rietveld 408576698