| Index: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
|
| index 20d676bd599f831973e38f18cfa0ba72015e47c3..29bdd8eeb95162fb4a2daf8a19ebc135bbc0c1a5 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl
|
| @@ -1,9 +1,3 @@
|
| -{%- macro get_default(field) -%}
|
| -{%- if field.default -%}
|
| -{{field.default|expression_to_text}}
|
| -{%- endif -%}
|
| -{%- endmacro -%}
|
| -
|
| // static
|
| {{struct.name}}Ptr {{struct.name}}::New() {
|
| {{struct.name}}Ptr rv;
|
| @@ -13,7 +7,7 @@
|
|
|
| {{struct.name}}::{{struct.name}}()
|
| {%-for field in struct.fields %}
|
| - {% if loop.first %}:{% else %} {% endif %} {{field.name}}({{get_default(field)}}){% if not loop.last %},{% endif %}
|
| + {% if loop.first %}:{% else %} {% endif %} {{field.name}}({{field|default_value}}){% if not loop.last %},{% endif %}
|
| {%- endfor %} {
|
| }
|
|
|
|
|