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

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

Issue 291773002: Mojo cpp bindings: fix |num_fields| in struct header of *Params_Data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl
index 9e835718d492e90197153fccef46241ac9af65ee..28f7f781313148ed29284c24b86109ddf023a6a1 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/params_definition.tmpl
@@ -32,7 +32,7 @@ class {{class_name}} {
private:
{{class_name}}() {
_header_.num_bytes = sizeof(*this);
- _header_.num_fields = 3;
+ _header_.num_fields = {{struct.packed.packed_fields|length}};
}
mojo::internal::StructHeader _header_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698