QtGui & its plugins: remove set-but-unused variables
Found by clang 13: qfontsubset.cpp:1211:10: warning: variable 'sumAdvances' set but not used [-Wunused-but-set-variable] Change-Id: Iea05060bc2c046928536fffd16adf500fb9bc8e5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
9ecf72704d
commit
edfb0922ea
|
|
@ -1208,7 +1208,6 @@ QByteArray QFontSubset::toTruetype() const
|
|||
QList<QTtfGlyph> glyphs;
|
||||
glyphs.reserve(numGlyphs);
|
||||
|
||||
uint sumAdvances = 0;
|
||||
for (int i = 0; i < numGlyphs; ++i) {
|
||||
glyph_t g = glyph_indices.at(i);
|
||||
QPainterPath path;
|
||||
|
|
@ -1231,9 +1230,6 @@ QByteArray QFontSubset::toTruetype() const
|
|||
font.maxp.maxPoints = qMax(font.maxp.maxPoints, glyph.numPoints);
|
||||
font.maxp.maxContours = qMax(font.maxp.maxContours, glyph.numContours);
|
||||
|
||||
if (glyph.xMax > glyph.xMin)
|
||||
sumAdvances += glyph.xMax - glyph.xMin;
|
||||
|
||||
// qDebug("adding glyph %d size=%d", glyph.index, glyph.data.size());
|
||||
glyphs.append(glyph);
|
||||
widths[i] = glyph.advanceWidth;
|
||||
|
|
|
|||
|
|
@ -208,9 +208,7 @@ bool ICOReader::canRead(QIODevice *iodev)
|
|||
|
||||
ICONDIR ikonDir;
|
||||
if (readIconDir(iodev, &ikonDir)) {
|
||||
qint64 readBytes = ICONDIR_SIZE;
|
||||
if (readIconDirEntry(iodev, &ikonDir.idEntries[0])) {
|
||||
readBytes += ICONDIRENTRY_SIZE;
|
||||
// ICO format does not have a magic identifier, so we read 6 different values, which will hopefully be enough to identify the file.
|
||||
if ( ikonDir.idReserved == 0
|
||||
&& (ikonDir.idType == 1 || ikonDir.idType == 2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue