Harfbuzz: Fix warnings of MSVC 64 bit
qtbase\src\3rdparty\harfbuzz\src\harfbuzz-shaper.cpp(97): error C2220: warning treated as error - no 'object' file generated qtbase\src\3rdparty\harfbuzz\src\harfbuzz-shaper.cpp(97): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) qtbase\src\3rdparty\harfbuzz\src\harfbuzz-shaper.cpp(284): warning C4800: 'HB_Bool': forcing value to bool 'true' or 'false' (performance warning) qtbase\src\3rdparty\harfbuzz\src\harfbuzz-arabic.c(924): warning C4244: 'initializing': conversion from '__int64' to 'int', possible loss of data qtbase\src\3rdparty\harfbuzz\src\harfbuzz-arabic.c(984): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data qtbase\src\3rdparty\harfbuzz\src\harfbuzz-arabic.c(995): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data Required to build QtCore after change a372cf5a80ec1a774f8f624b30b3c8209b800ec8. Change-Id: Ieb65c19e518984dde91bc8acab35203f8c271da3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
2ceccc6f7f
commit
69b43e74d7
6
src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
vendored
6
src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
vendored
@ -921,7 +921,7 @@ static void shapedString(const HB_UChar16 *uc, hb_uint32 stringLength, hb_uint32
|
|||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
hb_uint8 r = *ch >> 8;
|
hb_uint8 r = *ch >> 8;
|
||||||
int gpos = data - shapeBuffer;
|
const int gpos = int(data - shapeBuffer);
|
||||||
|
|
||||||
if (r != 0x06) {
|
if (r != 0x06) {
|
||||||
if (r == 0x20) {
|
if (r == 0x20) {
|
||||||
@ -981,7 +981,7 @@ static void shapedString(const HB_UChar16 *uc, hb_uint32 stringLength, hb_uint32
|
|||||||
/* qDebug("glyph %d (char %d) is mark!", gpos, i); */
|
/* qDebug("glyph %d (char %d) is mark!", gpos, i); */
|
||||||
} else {
|
} else {
|
||||||
attributes[gpos].mark = FALSE;
|
attributes[gpos].mark = FALSE;
|
||||||
clusterStart = data - shapeBuffer;
|
clusterStart = int(data - shapeBuffer);
|
||||||
}
|
}
|
||||||
attributes[gpos].clusterStart = !attributes[gpos].mark;
|
attributes[gpos].clusterStart = !attributes[gpos].mark;
|
||||||
attributes[gpos].combiningClass = HB_GetUnicodeCharCombiningClass(*ch);
|
attributes[gpos].combiningClass = HB_GetUnicodeCharCombiningClass(*ch);
|
||||||
@ -992,7 +992,7 @@ static void shapedString(const HB_UChar16 *uc, hb_uint32 stringLength, hb_uint32
|
|||||||
ch++;
|
ch++;
|
||||||
logClusters[i] = clusterStart;
|
logClusters[i] = clusterStart;
|
||||||
}
|
}
|
||||||
*shapedLength = data - shapeBuffer;
|
*shapedLength = int(data - shapeBuffer);
|
||||||
|
|
||||||
HB_FREE_STACKARRAY(props);
|
HB_FREE_STACKARRAY(props);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast)
|
|||||||
offsetBase = ((size * 10) - markTotalHeight) / 2; // Use offset that just fits
|
offsetBase = ((size * 10) - markTotalHeight) / 2; // Use offset that just fits
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rightToLeft = item->item.bidiLevel % 2;
|
const bool rightToLeft = (item->item.bidiLevel % 2) != 0;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
unsigned char lastCmb = 0;
|
unsigned char lastCmb = 0;
|
||||||
@ -281,7 +281,7 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
|
|||||||
|
|
||||||
// first char in a run is never (treated as) a mark
|
// first char in a run is never (treated as) a mark
|
||||||
int cStart = 0;
|
int cStart = 0;
|
||||||
const bool symbolFont = item->face->isSymbolFont;
|
const bool symbolFont = item->face->isSymbolFont != 0;
|
||||||
attributes[0].mark = false;
|
attributes[0].mark = false;
|
||||||
attributes[0].clusterStart = true;
|
attributes[0].clusterStart = true;
|
||||||
attributes[0].dontPrint = (!symbolFont && uc[0] == 0x00ad) || HB_IsControlChar(uc[0]);
|
attributes[0].dontPrint = (!symbolFont && uc[0] == 0x00ad) || HB_IsControlChar(uc[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user