Closed
Bug 1603110
Opened 6 years ago
Closed 1 year ago
Clarify how to convert the result of integral expressions to bool
Categories
(Core :: DOM: File, task, P3)
Core
DOM: File
Tracking
()
RESOLVED
INVALID
People
(Reporter: sg, Unassigned)
References
(Blocks 1 open bug)
Details
In https://phabricator.services.mozilla.com/D55469#inline-343915, the question came up whether to use static_cast<bool> or a comparison against 0 to convert the result of integral expression to bool, in that case:
static_cast<bool>(mInitializationAttempts & initialization);
vs.
mInitializationAttempts & initialization != 0
This should be clarified in the coding style, with case distinctions for similar cases if necessary.
Updated•6 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
Comment 6•1 year ago
|
||
I think the team-specific coding style guide is moot now.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•