Consider the two code segments below. Which one is better and Why? If you have any other idea, please do mention. Where can I find answers to coding p
My habit is to avoid if-blocks this way:
bool MyApplication::ReportGenerator::GenerateReport(){ bool report = !( isAdmin() || isConditionOne() || isConditionTwo() || isConditionThree() ); return report ? generateReport() : false; }