diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index c21d8e761..0f43a7615 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -330,9 +330,9 @@ std::string Preprocessor::read(std::istream &istr) static bool hasbom(const std::string &str) { return bool(str.size() > 3 && - (char)str[0] == (char)0xef && - (char)str[1] == (char)0xbb && - (char)str[2] == (char)0xbf); + static_cast(str[0]) == 0xef && + static_cast(str[1]) == 0xbb && + static_cast(str[2]) == 0xbf); }