I have a question about whether the compiler will auo optimize the if statement.
E.g:
case 1 :
if (conditionA && conditionB)
{
do something
}
case 2 :
if (conditionA)
{
if (condtionB)
{
do something
}
}
It is easy to understand both case do the same thing. But my question is, in case 1, if conditionA is false, will conditionB still be calculated or not ??
There will be similar case for "||" which if conditonA is true.