]> git.sesse.net Git - stockfish/commitdiff
Avoid casts to handle isspace() arguments
authorMarco Costalba <mcostalba@gmail.com>
Mon, 1 Sep 2008 06:03:21 +0000 (08:03 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 1 Sep 2008 06:03:21 +0000 (08:03 +0200)
Use proper standard conversion to deal
with negative values of a char.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/uci.cpp

index 66a2ade3a2640f553966dff7e86c38b99cf3bbc5..a3b4d8c0ed72ef2efe14f1f45698a94f00020557 100644 (file)
@@ -119,7 +119,7 @@ namespace {
   // characters from the current location in an input string.
 
   void UCIInputParser::skip_whitespace() {
-    while(isspace((int)(unsigned char)this->inputLine[this->currentIndex]))
+    while(isspace(std::char_traits<char>::to_int_type(this->inputLine[this->currentIndex])))
       this->currentIndex++;
   }