aboutsummaryrefslogtreecommitdiff
path: root/target-moxie
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-11-18 01:52:40 -0700
committerMarkus Armbruster <armbru@redhat.com>2015-12-17 08:21:26 +0100
commite564e2dd5963a75f32bbb90ac8181ba9dca2f1aa (patch)
treea26e0eb46fc5f76229ed818de688181072af155f /target-moxie
parentfff5f231d5f96e8521761efcd35a12479594059a (diff)
downloadqemu-e564e2dd5963a75f32bbb90ac8181ba9dca2f1aa.zip
qemu-e564e2dd5963a75f32bbb90ac8181ba9dca2f1aa.tar.gz
qemu-e564e2dd5963a75f32bbb90ac8181ba9dca2f1aa.tar.bz2
qapi: Simplify QAPISchemaObjectTypeMember.check()
QAPISchemaObjectTypeMember.check() currently does four things: 1. Compute self.type 2. Accumulate members in all_members Only one caller cares: QAPISchemaObjectType.check() uses it to compute self.members. The other callers pass a throw-away accumulator. 3. Accumulate a map from names to members in seen Only one caller cares: QAPISchemaObjectType.check() uses it to compute its local variable seen, for self.variants.check(), which uses it to compute self.variants.tag_member from self.variants.tag_name. The other callers pass a throw-away accumulator. 4. Check for collisions This piggybacks on 3: before adding a new entry, we assert it's new. Only one caller cares: QAPISchemaObjectType.check() uses it to assert non-variant members don't clash. Simplify QAPISchemaObjectType.check(): move 2.-4. to QAPISchemaObjectType.check(), and drop parameters all_members and seen. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1446559499-26984-2-git-send-email-armbru@redhat.com> [rebase to earlier changes that moved tag_member.check() of alternate types, commit message typo fix] Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1447836791-369-6-git-send-email-eblake@redhat.com>
Diffstat (limited to 'target-moxie')
0 files changed, 0 insertions, 0 deletions