Příklad
void
function(
int
input)
{
if
(input & 0x101){
doSomething();
}
}
Řešení
Pokud není výsledek roven nule, ověřuje podmínka na true. Je mnohem čistší, pokud to zobrazíte přímo.
void
function
(
int
input)
{
int
result = input & 0x101
;
if
(result != 0){
do
Something
();
}
}