title: Forcing value to boolean: (bool) makes warning, !! doesnt
body: <p>I like (bool) way more, but it generates warnings. How do i get rid off the warnings?</p>
  
  <p>I have code like:</p>
  
  <pre><code>bool something_else = 0;
  
  void switcher(int val = -1){
      if(val != -1){
          something_else = (bool)val;
      }else{
          something_else ^= 1;
      }
  }
  </code></pre>
  
  <p>Should i just do it like everyone else and use '!!' or make it somehow hide the warning messages when using (bool) ? Or is '!!' actually faster than (bool) ?</p>
  
  <p>I would like to use (bool) and so i have to hide the warning, but how?</p>
  
  <p><strong>Edit:</strong> Visual Studio 2008 i am using, sorry i forgot to tell.</p>
  
  <p><strong>Edit 2:</strong> The warning message is <code>warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)</code> And it comes on the line <code>something_else = (bool)val;</code> And on the line <code>something_else = val;</code> But not on the line <code>something_else = !!val;</code></p>
  
  <p>The problem is, i want it to respect that i want to convert it to boolean. I dont want to hide all boolean warnings, because sometimes they saved my ass.</p>