]> xenbits.xensource.com Git - libvirt.git/commit
docs: coding-style: Rewrite section on shortening comparisons
authorTim Wiederhake <twiederh@redhat.com>
Thu, 13 Jan 2022 16:01:52 +0000 (17:01 +0100)
committerTim Wiederhake <twiederh@redhat.com>
Mon, 17 Jan 2022 09:58:59 +0000 (10:58 +0100)
commit15ca9bf2bc8618f672501ab255600b3eabe950e7
tree22206f11aadf024566c9226f16963b0a3cab7b3d
parent364cf32e578b7d990dfec303750848d5d7681859
docs: coding-style: Rewrite section on shortening comparisons

The code style showed `bool hasFoos; if (hasFoos == true)` as a
good example in one place, only to warn against comparisons with
`true` a couple of paragraphs further down.

Merge this advice on comparing with `true` into the "Conditional
expressions" section and split the example up for readability.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/coding-style.rst