Commit 59cf26d7 authored by Alexander Schrode's avatar Alexander Schrode Committed by oroulet

remove usless else

parent 48dee144
...@@ -162,13 +162,12 @@ class StructGenerator(object): ...@@ -162,13 +162,12 @@ class StructGenerator(object):
if _type == 'Bit': if _type == 'Bit':
# Bits are used for bit fields and filler ignore # Bits are used for bit fields and filler ignore
continue continue
else: field = Field(_clean_name)
field = Field(_clean_name) field.uatype = clean_name(_type)
field.uatype = clean_name(_type) if xmlfield.get("SwitchField", '') != '':
if xmlfield.get("SwitchField", '') != '': # Optional Field
# Optional Field field.is_optional = True
field.is_optional = True struct.option_counter += 1
struct.option_counter += 1
field.value = get_default_value(field.uatype, enums) field.value = get_default_value(field.uatype, enums)
if array: if array:
field.array = True field.array = True
......
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