bool bFailed = false; bFailed |= bFailed ? true : condition1; bFailed |= bFailed ? true : condition2; bFailed |= bFailed ? true : condition3; if( !bFailed ) { PerformActionOnAllSuccess(); DoNormalCleanup(); } else { DoFailedCleanup(); }
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)