Re: [Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > For less code, reflect the determined boolean value of an optional > visit back to the caller instead of making the caller read the > boolean after the fact. > > The resulting generated code has the following diff: > > |-visit_optional(v, &has_fdset_id, "fdset-id"); > |-

[Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields

2015-11-18 Thread Eric Blake
For less code, reflect the determined boolean value of an optional visit back to the caller instead of making the caller read the boolean after the fact. The resulting generated code has the following diff: |-visit_optional(v, &has_fdset_id, "fdset-id"); |-if (has_fdset_id) { |+if (vi