void func( bool d ) { if( ! ( d ) ) return; //Load of code here that you don't want to execute if the above is incorrect. }