From: Marco Costalba Date: Mon, 1 Sep 2008 06:03:21 +0000 (+0200) Subject: Avoid casts to handle isspace() arguments X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b8e487ff9caffb5061f680b1919ab2fe442bc0a1;ds=sidebyside Avoid casts to handle isspace() arguments Use proper standard conversion to deal with negative values of a char. Signed-off-by: Marco Costalba --- diff --git a/src/uci.cpp b/src/uci.cpp index 66a2ade3..a3b4d8c0 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -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::to_int_type(this->inputLine[this->currentIndex]))) this->currentIndex++; }