Fix unsigned/signed mismatch warning in KTX file reading
On MSCV x86 (32bit) the comparison of qsizetype with std::numeric_limits<quint32>::max() leads to a warning. This patch adds a static cast to avoid the warning. This is an ammendment to 28ecb523ce8490bff38b251b3df703c72e057519 Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Ie50572165ac31aafa7d23570bc133c5c96cf8b00 Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
This commit is contained in:
parent
39505c86cc
commit
6463b36da0
@ -105,7 +105,7 @@ QTextureFileData QKtxHandler::read()
|
||||
return QTextureFileData();
|
||||
|
||||
const QByteArray buf = device()->readAll();
|
||||
if (buf.size() > std::numeric_limits<quint32>::max()) {
|
||||
if (static_cast<size_t>(buf.size()) > std::numeric_limits<quint32>::max()) {
|
||||
qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
|
||||
return QTextureFileData();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user