title: Warning: Value was defined but never used; consider replacing with a boolean test
body: <p>I have a function that is getting the following warning:</p>
  
  <blockquote>
    <p>Value intVal was defined but never used; consider replacing with a boolean test.</p>
  </blockquote>
  
  <pre><code>func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -&gt; Bool 
  {
      text = (timerTxtFld.text! as NSString).stringByReplacingCharactersInRange(range, withString: string)
      if let intVal = Int(text) {
          timerDoneBtn.alpha = 1
          timerDoneBtn.enabled = true
      } else {
          timerDoneBtn.enabled = false
      }
      return true
  }
  </code></pre>
  
  <p>Could anyone help me work out what I need to do to get rid of the error?</p>