Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl |
| index 28d63997b9d51ca1dc09cb840bed7c42a9c860be..8d3369167381407ca7d6e787f2b1f1857921d89b 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl |
| @@ -48,7 +48,10 @@ class {{class_name}} { |
| {%- endif %} |
| private: |
| - {{class_name}}(); |
| + {{class_name}}() { |
|
Fady Samuel
2016/08/03 23:44:05
Does inlining the constructor help here? Can you a
yzshen1
2016/08/03 23:58:14
It doesn't help much actually. I saw some New() ca
|
| + header_.num_bytes = sizeof(*this); |
| + header_.version = {{struct.versions[-1].version}}; |
| + } |
| ~{{class_name}}() = delete; |
| }; |
| static_assert(sizeof({{class_name}}) == {{struct.versions[-1].num_bytes}}, |