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 f01479a2f612bb6c41b48a785a9de8898224ced0..f5452d727803a4dc3163c65f7082a3795f568012 100644 |
--- a/tools/json_schema_compiler/cc_generator.py |
+++ b/tools/json_schema_compiler/cc_generator.py |
@@ -749,11 +749,11 @@ class CCGenerator(object): |
'%s_%s' % (classname.upper(), enum_value.upper()), |
'scoped_ptr<base::Value>(base::Value::CreateStringValue("%s"))' % |
enum_value)) |
- (c.Eblock('}') |
- .Append('NOTREACHED();') |
- .Append('return scoped_ptr<base::Value>();') |
- .Eblock('}') |
- ) |
+ (c.Append('default:') |
+ .Append(' NOTREACHED();') |
not at google - send to devlin
2012/09/11 23:07:43
is this necessary?
cduvall
2012/09/11 23:10:38
I just had it because that's what used to be there
not at google - send to devlin
2012/09/11 23:14:09
Used to be there when?
cduvall
2012/09/11 23:18:28
Were you talking about the NOTREACHED or the defau
not at google - send to devlin
2012/09/11 23:19:52
Yeah, the thing abou the default case vs the fall-
|
+ .Eblock('}') |
+ .Append('return scoped_ptr<base::Value>();') |
+ .Eblock('}')) |
return c |
# TODO(chebert): This is basically the same as GenerateCreateEnumTypeValue(). |