Index: tools/json_schema_compiler/cpp_type_generator.py |
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py |
index 04e008051368f5e67974a04463ea715b70428c08..e0e507e9d91e62395c55b26583b91a3f5060c93b 100644 |
--- a/tools/json_schema_compiler/cpp_type_generator.py |
+++ b/tools/json_schema_compiler/cpp_type_generator.py |
@@ -173,11 +173,13 @@ class CppTypeGenerator(object): |
for namespace, types in sorted(self._NamespaceTypeDependencies().items()): |
c.Append('namespace %s {' % namespace.name) |
for type_ in types: |
- c.Append('struct %s;' % type_) |
+ if (self._type_namespaces[self._QualifyName(namespace, type_)] |
Yoyo Zhou
2012/04/10 19:26:48
I feel like this all should be type_.type_ (as bel
cduvall
2012/04/12 00:41:23
Done.
|
+ .types[type_].type_ != PropertyType.ARRAY): |
+ c.Append('struct %s;' % type_) |
c.Append('}') |
c.Concat(self.GetNamespaceStart()) |
for (name, type_) in self._namespace.types.items(): |
- if not type_.functions: |
+ if not type_.functions and type_.type_ != PropertyType.ARRAY: |
c.Append('struct %s;' % name) |
c.Concat(self.GetNamespaceEnd()) |
return c |