File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ to implicit integer conversions and missed short-circuit evaluation.
1313.. code-block :: c++
1414
1515 bool invalid = false;
16- invalid |= x > limit.x; // warning: use logical operator instead of bitwise one for bool
17- invalid |= y > limit.y; // warning: use logical operator instead of bitwise one for bool
18- invalid |= z > limit.z; // warning: use logical operator instead of bitwise one for bool
16+ invalid |= x > limit.x; // warning: use logical operator '| |' for boolean variable 'invalid' instead of bitwise operator '| ='
17+ invalid |= y > limit.y; // warning: use logical operator '| |' for boolean variable 'invalid' instead of bitwise operator '| ='
18+ invalid |= z > limit.z; // warning: use logical operator '| |' for boolean variable 'invalid' instead of bitwise operator '| ='
1919 if (invalid) {
2020 // error handling
2121 }
You can’t perform that action at this time.
0 commit comments