[Interest] Operator QMap<uint, uint> is casting to int?
smurphy at walbro.com
Fri May 3 16:57:39 CEST 2019
> uint foregroundPixels = reverseKeys[foregroundIndex];
> uint foregroundColor = reverseKeys[foregroundPixels]; //main.cpp:66:37: warning: implicit conversion changes signedness: 'uint' (aka 'unsigned int') to 'int'
> Where is the "signed" conversion happening?
foregroundPixels is a uint.
reverseKeys is a QList.
The QList subscript operator takes an int for the index (https://doc.qt.io/qt-5/qlist.html#operator-5b-5d), but you're passing it a uint.
This message has been scanned for malware by Forcepoint. www.forcepoint.com
More information about the Interest