In C++ I read a coding guideline as "check return value in If control statement" Like,
if(TRUE == fun1())
{
//Statements
}
When "fun1" returns True, internally in "if" statement it will be compared with “true”. Is it necessary to compare externally.? Is this a good practice or is this style of coding decreases performance.?
Aucun commentaire:
Enregistrer un commentaire