Consider:
bool b = (a == 3) ? a : 0;
which can be replaced with:
bool b = (a == 3);
The idea is to do data flow analysis and note that `a` has the value of 3 or !=3 when on a leg of a conditional code path.
Comment #1 by robert.schadek — 2024-12-13T19:17:34Z