| 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 6bec67e43c03187e15d7d9cbba51b823cb016a5c..44ff97898f24e53b19babac6d343dac21e208634 100644
|
| --- a/tools/json_schema_compiler/cpp_type_generator.py
|
| +++ b/tools/json_schema_compiler/cpp_type_generator.py
|
| @@ -244,30 +244,30 @@ class CppTypeGenerator(object):
|
| deps |= self._TypeDependencies(p.type_, hard=not p.optional)
|
| return deps
|
|
|
| - def GeneratePropertyValues(self, property, line, nodoc=False):
|
| + def GeneratePropertyValues(self, prop, line, nodoc=False):
|
| """Generates the Code to display all value-containing properties.
|
| """
|
| c = Code()
|
| if not nodoc:
|
| - c.Comment(property.description)
|
| + c.Comment(prop.description)
|
|
|
| - if property.value is not None:
|
| + if prop.value is not None:
|
| c.Append(line % {
|
| - "type": self.GetCppType(property.type_),
|
| - "name": property.name,
|
| - "value": property.value
|
| + "type": self.GetCppType(prop.type_),
|
| + "name": prop.name,
|
| + "value": prop.value
|
| })
|
| else:
|
| has_child_code = False
|
| - c.Sblock('namespace %s {' % property.name)
|
| - for child_property in property.type_.properties.values():
|
| + c.Sblock('namespace %s {' % prop.name)
|
| + for child_property in prop.type_.properties.values():
|
| child_code = self.GeneratePropertyValues(child_property,
|
| line,
|
| nodoc=nodoc)
|
| if child_code:
|
| has_child_code = True
|
| c.Concat(child_code)
|
| - c.Eblock('} // namespace %s' % property.name)
|
| + c.Eblock('} // namespace %s' % prop.name)
|
| if not has_child_code:
|
| c = None
|
| return c
|
|
|