From 52e9bb64190c2f17754e46940d6be99075814fc4 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Fri, 5 Dec 2014 12:13:07 -0700 Subject: glave: Update replay to use code-gen version of xgl_enum_string_helper.h --- xgl-helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xgl-helper.py b/xgl-helper.py index 298b30f9..be7f71be 100755 --- a/xgl-helper.py +++ b/xgl-helper.py @@ -172,8 +172,9 @@ class HeaderFileParser: # strip comma and comment, then extra split in case of no comma w/ comments enum_val = enum_val.strip().split(',', 1)[0] self.enum_val_dict[enum_name]['val'] = enum_val.split()[0] - # TODO : Make this more robust, to verify if enum value is unique - # Currently just try to cast to int which works ok but missed -(HEX) values + # account for negative values surrounded by parens + self.enum_val_dict[enum_name]['val'] = self.enum_val_dict[enum_name]['val'].strip(')').replace('-(', '-') + # Try to cast to int to determine if enum value is unique try: #print("ENUM val:", self.enum_val_dict[enum_name]['val']) int(self.enum_val_dict[enum_name]['val'], 0) -- cgit v1.2.3