| Index: tools/json_schema_compiler/cc_generator.py
|
| diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
|
| index 267d9fe8f106a4368a726cd1432e3cb2e10344fe..7e0ddc94828415b69cfb40caf91a634afdc01590 100644
|
| --- a/tools/json_schema_compiler/cc_generator.py
|
| +++ b/tools/json_schema_compiler/cc_generator.py
|
| @@ -162,7 +162,7 @@ class _Generator(object):
|
| else '')
|
| items.append('%s(%s%s)' % (prop.unix_name,
|
| namespace_prefix,
|
| - self._type_helper.GetEnumNoneValue(t)))
|
| + self._type_helper.GetEnumNoneValue(real_t)))
|
| elif prop.optional:
|
| continue
|
| elif t.property_type == PropertyType.INTEGER:
|
| @@ -387,7 +387,7 @@ class _Generator(object):
|
| (c.Append('} else {')
|
| .Append('%%(dst)s->%%(name)s = %s%s;' %
|
| (namespace_prefix,
|
| - self._type_helper.GetEnumNoneValue(prop.type_))))
|
| + self._type_helper.GetEnumNoneValue(underlying_type))))
|
| c.Eblock('}')
|
| else:
|
| (c.Sblock(
|
| @@ -462,7 +462,7 @@ class _Generator(object):
|
| c.Sblock('if (%s != %s%s) {' %
|
| (prop_var,
|
| maybe_namespace,
|
| - self._type_helper.GetEnumNoneValue(prop.type_)))
|
| + self._type_helper.GetEnumNoneValue(underlying_type)))
|
| else:
|
| c.Sblock('if (%s.get()) {' % prop_var)
|
|
|
| @@ -1128,7 +1128,7 @@ class _Generator(object):
|
| dst,
|
| prop.unix_name,
|
| namespace_prefix,
|
| - self._type_helper.GetEnumNoneValue(prop.type_)))
|
| + self._type_helper.GetEnumNoneValue(underlying_type)))
|
| return c
|
|
|
| def _GenerateError(self, body):
|
|
|