Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy: Don't need to test a bool against 0/1 in an if statement.
The clang-tidy "implicit boolean conversion" check pointed out a couple of places where a boolean value was being explicitly compared to the number 0/1. This requires an implicit conversion to an integer to perform the check, and then an implicit conversion back to boolean to determine whether to take the if/else branch. Using the pre-existing boolean value eliminates both conversions. https://clang.llvm.org/extra/clang-tidy/checks/readability-implicit-bool-conversion.html
- Loading branch information
1 parent
c8adbdf
commit f759974
Showing
5 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters