diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 18:02:38 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 18:11:12 +0100 |
commit | 4c1de38c536f5b3d7f77c8e9699ea20b51419af3 (patch) | |
tree | af8f2647a1e99706a019d12e84918113a1aa5fd9 | |
parent | 9f0e49eb1709d297a6811f8a54e3b67f3b8e6a8c (diff) |
Parser: Fix potential trunction of constant value
Fixes:
src\library\parser.cpp(52): warning C4309: 'static_cast': truncation of constant value
src\library\parser.cpp(55): warning C4309: 'static_cast': truncation of constant value
src\library\parser.cpp(57): warning C4309: 'static_cast': truncation of constant value
-rw-r--r-- | src/library/parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/parser.cpp b/src/library/parser.cpp index f89dd39452..5a8ab4bd3b 100644 --- a/src/library/parser.cpp +++ b/src/library/parser.cpp @@ -49,12 +49,12 @@ bool Parser::isBinary(const QString& filename) { return false; } // Check for UTF-8 BOM - if (firstByte == static_cast<char>(0xEF)) { + if (firstByte == '\xEF') { char nextChar; if (file.getChar(&nextChar) && - nextChar == static_cast<char>(0xBB) && + nextChar == '\xBB' && file.getChar(&nextChar) && - nextChar == static_cast<char>(0xBF)) { + nextChar == '\xBF') { // UTF-8 text file return false; } |