michelson last edited by
Why the statement:
@ QByteArray data (initialized somehow);
@ if(data.at(0) == 0xFF)
gives such warning:
comparison is always false due to limited range of data type [-Wtype-limits].
You can initialize QByteArray with 0xff value (or not...?), so why cant you compare it?
yeckel last edited by yeckel
Hi Michelson, welcome to devnet.
It's because char is signed in your environment (compiler dependent?) and you are comparing something which has range <–128, 127> with 0xFF which is 255.