clang-tidy: readability-simplify-boolean-expr (#4639)

This commit is contained in:
Eisuke Kawashima
2022-03-17 21:50:50 +09:00
committed by GitHub
parent 2d7eb89ffc
commit ba6d8e0d3b
41 changed files with 130 additions and 288 deletions

View File

@@ -26,7 +26,7 @@ int StringChromosome<bool, BinaryStringChromosomePolicy>::decodeToInt(
int mask = 1, result = 0;
bool *ptr = string.get() + start;
for (int i = 0; i < nBits; i++, mask <<= 1) {
if (*ptr++ == true) {
if (*ptr++) {
result |= mask;
}
}