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

Unified Diff: tools/json_to_struct/json_to_struct.py

Issue 382673002: Fixes for re-enabling more MSVC level 4 warnings: misc edition #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: tools/json_to_struct/json_to_struct.py
diff --git a/tools/json_to_struct/json_to_struct.py b/tools/json_to_struct/json_to_struct.py
index 38b6341091c287a45030eb574b3ebbd75530df8c..2e9c83c726fb23a28a232cfd24312efdac4b841f 100755
--- a/tools/json_to_struct/json_to_struct.py
+++ b/tools/json_to_struct/json_to_struct.py
@@ -99,14 +99,14 @@ def _GenerateH(basepath, fileroot, head, namespace, schema, description):
with open(os.path.join(basepath, h_filename), 'w') as f:
f.write(head)
- f.write('#include <cstddef>\n')
- f.write('\n')
-
header_guard = _GenerateHeaderGuard(h_filename)
f.write('#ifndef %s\n' % header_guard)
f.write('#define %s\n' % header_guard)
f.write('\n')
+ f.write('#include <cstddef>\n')
+ f.write('\n')
Peter Kasting 2014/07/09 22:19:54 This just ensures the generated code puts all the
+
for header in schema.get('headers', []):
f.write('#include "%s"\n' % header)
f.write('\n')

Powered by Google App Engine
This is Rietveld 408576698