QWindowsFontEngineDirectWrite: Fix build with MinGW

In member function 'void tn::QWindowsFontEngineDirectWrite::collectMetrics()':
windows\qwindowsfontenginedirectwrite.cpp:361:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) {
                      ^
Amends 17fc188aec.

Task-number: QTBUG-58954
Change-Id: Ice2ff135d411b55d32290069b3c85ca0b5ea09af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Friedemann Kleint 2017-04-12 09:35:52 +02:00
parent e45516ea0d
commit 59d4cbca0b

View File

@ -358,7 +358,7 @@ void QWindowsFontEngineDirectWrite::collectMetrics()
QByteArray table = getSfntTable(MAKE_TAG('h', 'h', 'e', 'a'));
const int advanceWidthMaxLocation = 10;
if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) {
if (table.size() >= advanceWidthMaxLocation + int(sizeof(quint16))) {
quint16 advanceWidthMax = qFromBigEndian<quint16>(table.constData() + advanceWidthMaxLocation);
m_maxAdvanceWidth = DESIGN_TO_LOGICAL(advanceWidthMax);
}