Commit 765e7a63 authored by Karandeep Bhatia's avatar Karandeep Bhatia Committed by Commit Bot

JsonSchemaCompiler: Remove unused 'camel_case_enum_to_string' compiler option.

BUG=None

Change-Id: I48cbebafc592ce6e81561d8f822bd52161ca5f9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366292
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799997}
parent 1fa2bbfc
...@@ -1219,8 +1219,6 @@ class _Generator(object): ...@@ -1219,8 +1219,6 @@ class _Generator(object):
c.Sblock('switch (enum_param) {') c.Sblock('switch (enum_param) {')
for enum_value in self._type_helper.FollowRef(type_).enum_values: for enum_value in self._type_helper.FollowRef(type_).enum_values:
name = enum_value.name name = enum_value.name
if 'camel_case_enum_to_string' in self._namespace.compiler_options:
name = enum_value.CamelName()
(c.Append('case %s: ' % self._type_helper.GetEnumValue(type_, enum_value)) (c.Append('case %s: ' % self._type_helper.GetEnumValue(type_, enum_value))
.Append(' return "%s";' % name)) .Append(' return "%s";' % name))
(c.Append('case %s:' % self._type_helper.GetEnumNoneValue(type_)) (c.Append('case %s:' % self._type_helper.GetEnumNoneValue(type_))
...@@ -1251,8 +1249,6 @@ class _Generator(object): ...@@ -1251,8 +1249,6 @@ class _Generator(object):
# "fatal error C1061: compiler limit : blocks nested too deeply" # "fatal error C1061: compiler limit : blocks nested too deeply"
# on Windows. # on Windows.
name = enum_value.name name = enum_value.name
if 'camel_case_enum_to_string' in self._namespace.compiler_options:
name = enum_value.CamelName()
(c.Append('if (enum_string == "%s")' % name) (c.Append('if (enum_string == "%s")' % name)
.Append(' return %s;' % .Append(' return %s;' %
self._type_helper.GetEnumValue(type_, enum_value))) self._type_helper.GetEnumValue(type_, enum_value)))
......
...@@ -529,8 +529,6 @@ class IDLSchema(object): ...@@ -529,8 +529,6 @@ class IDLSchema(object):
platforms = list(node.value) platforms = list(node.value)
elif node.name == 'implemented_in': elif node.name == 'implemented_in':
compiler_options['implemented_in'] = node.value compiler_options['implemented_in'] = node.value
elif node.name == 'camel_case_enum_to_string':
compiler_options['camel_case_enum_to_string'] = node.value
elif node.name == 'generate_error_messages': elif node.name == 'generate_error_messages':
compiler_options['generate_error_messages'] = True compiler_options['generate_error_messages'] = True
elif node.name == 'deprecated': elif node.name == 'deprecated':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment