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

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

Issue 2210673002: Improve gfx::Transform StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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}},
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698