summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler/h_generator.py
diff options
context:
space:
mode:
authorwjywbs@gmail.com <wjywbs@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 02:15:35 +0000
committerwjywbs@gmail.com <wjywbs@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 02:15:35 +0000
commit8f120ac4ffbcfae1ce35861b14c0e5fa03e5bd74 (patch)
treeb3733291d4a325078f66ab77f4767b4c3a197c18 /tools/json_schema_compiler/h_generator.py
parenta7de9693f066e9e047b2ace506ae7dabc26e25f1 (diff)
downloadchromium_src-8f120ac4ffbcfae1ce35861b14c0e5fa03e5bd74.zip
chromium_src-8f120ac4ffbcfae1ce35861b14c0e5fa03e5bd74.tar.gz
chromium_src-8f120ac4ffbcfae1ce35861b14c0e5fa03e5bd74.tar.bz2
Fix compile error if both inline and reference enums are used in a type.
The ToString() overloading function of inline and reference enums will conflict because they exist in both global namespace and local classes. This patch chooses the correct ToString() function in different namespaces. R=kalman@chromium.org BUG=371042 Review URL: https://codereview.chromium.org/279833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler/h_generator.py')
-rw-r--r--tools/json_schema_compiler/h_generator.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index a7cac43..fbb79e3 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -214,8 +214,6 @@ class _Generator(object):
# static. On the other hand, those declared inline (e.g. in an object) do.
maybe_static = '' if is_toplevel else 'static '
(c.Append()
- .Append('%sstd::string %sToString(%s as_enum);' %
- (maybe_static, classname, classname))
.Append('%sstd::string ToString(%s as_enum);' %
(maybe_static, classname))
.Append('%s%s Parse%s(const std::string& as_string);' %