mirror of https://github.com/qt/qtbase.git
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 28ecb523ce
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();
|
return QTextureFileData();
|
||||||
|
|
||||||
const QByteArray buf = device()->readAll();
|
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());
|
qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue