Index: tools/json_schema_compiler/cpp_util.py |
diff --git a/tools/json_schema_compiler/cpp_util.py b/tools/json_schema_compiler/cpp_util.py |
index 1e7c3707883bccdce8fd80279e210ad0620bee36..64ac9b05c187bd609671467dbe466de0fecdf536 100644 |
--- a/tools/json_schema_compiler/cpp_util.py |
+++ b/tools/json_schema_compiler/cpp_util.py |
@@ -110,6 +110,8 @@ def OpenNamespace(namespace): |
"""Get opening root namespace declarations. |
""" |
c = Code() |
+ if namespace == '': |
+ return c |
not at google - send to devlin
2014/01/23 16:07:12
why do you need these changes?
David Tseng
2014/01/23 17:44:42
Check out ui/accessibility/accessibility.gyp and a
not at google - send to devlin
2014/01/23 18:01:23
I see. Can you leave out the root_namespace from t
David Tseng
2014/01/23 18:18:25
Agreed. However, root_namespace is required and gy
|
for component in namespace.split('::'): |
c.Append('namespace %s {' % component) |
return c |
@@ -119,6 +121,8 @@ def CloseNamespace(namespace): |
"""Get closing root namespace declarations. |
""" |
c = Code() |
+ if namespace == '': |
+ return c |
for component in reversed(namespace.split('::')): |
c.Append('} // namespace %s' % component) |
return c |