| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from code import Code | 5 from code import Code |
| 6 from model import PropertyType, Type | 6 from model import PropertyType, Type |
| 7 import cpp_util | 7 import cpp_util |
| 8 import model | 8 import model |
| 9 import schema_util | 9 import schema_util |
| 10 import sys | 10 import sys |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 """ | 802 """ |
| 803 c = Code() | 803 c = Code() |
| 804 underlying_type = self._type_helper.FollowRef(prop.type_) | 804 underlying_type = self._type_helper.FollowRef(prop.type_) |
| 805 if (underlying_type.property_type == PropertyType.ENUM and | 805 if (underlying_type.property_type == PropertyType.ENUM and |
| 806 prop.optional): | 806 prop.optional): |
| 807 c.Append('%s->%s = %s;' % ( | 807 c.Append('%s->%s = %s;' % ( |
| 808 dst, | 808 dst, |
| 809 prop.unix_name, | 809 prop.unix_name, |
| 810 self._type_helper.GetEnumNoneValue(prop.type_))) | 810 self._type_helper.GetEnumNoneValue(prop.type_))) |
| 811 return c | 811 return c |
| OLD | NEW |