From edfb0922ea697ca96a3a61d029c64eb4de98e967 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 14 Oct 2021 10:13:44 -0700 Subject: 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 --- src/gui/text/qfontsubset.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/gui/text') diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 93ab5e27db..295af01f8c 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -1208,7 +1208,6 @@ QByteArray QFontSubset::toTruetype() const QList 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; -- cgit v1.2.3