diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-09-28 15:12:02 -0600 |
|---|---|---|
| committer | Mike Schuchardt <mikes@lunarg.com> | 2018-03-09 13:54:31 -0700 |
| commit | 59c391296a6af01fbec5ac705aa699711a423a27 (patch) | |
| tree | f718a9ccd089bab126c347f4cef6e7fcc09864ce /scripts | |
| parent | 85ac95c7aab30c18826f458832d076572a0ee267 (diff) | |
| download | usermoji-59c391296a6af01fbec5ac705aa699711a423a27.tar.xz | |
scripts: Avoid duplicates in enum string helper
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/helper_file_generator.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/helper_file_generator.py b/scripts/helper_file_generator.py index ba885558..6f2ea4b6 100644 --- a/scripts/helper_file_generator.py +++ b/scripts/helper_file_generator.py @@ -185,7 +185,9 @@ class HelperFileOutputGenerator(OutputGenerator): for elem in groupElem.findall('enum'): if elem.get('supported') != 'disabled': item_name = elem.get('name') - value_list.append(item_name) + # Avoid duplicates + if item_name not in value_list: + value_list.append(item_name) if value_list is not None: self.enum_output += self.GenerateEnumStringConversion(groupName, value_list) elif self.helper_file_type == 'object_types_header': |
