diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-16 16:13:40 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-19 16:51:29 +0200 |
commit | 8ff197cd111a2fef784399f46bf7b7917d1b3524 (patch) | |
tree | 50974133742626bfaae6ce0b392beaf0fffe254d /src/gui/text/qfontsubset.cpp | |
parent | c554f9ef0a8af91597d367c8fb69568def871c32 (diff) |
QPdf: consolidate usage of uint
Objects in QPdf are indexed by uint. In a couple of places
(incl. QFontSubset) int were used instead, causing sign conversion
warnings (turned into errors by -Werror). Use uint instead.
Change-Id: Ie0436c8aff3b67d8ef95a5f26fc16403e7e02bd1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/text/qfontsubset.cpp')
-rw-r--r-- | src/gui/text/qfontsubset.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 9f1b19e4da..f0b64e114b 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -201,7 +201,7 @@ QList<int> QFontSubset::getReverseMap() const { QList<int> reverseMap(0x10000, 0); for (uint uc = 0; uc < 0x10000; ++uc) { - int idx = glyph_indices.indexOf(fontEngine->glyphIndex(uc)); + auto idx = glyph_indices.indexOf(fontEngine->glyphIndex(uc)); if (idx >= 0 && !reverseMap.at(idx)) reverseMap[idx] = uc; } @@ -300,14 +300,14 @@ QByteArray QFontSubset::createToUnicodeMap() const return touc; } -int QFontSubset::addGlyph(int index) +int QFontSubset::addGlyph(uint index) { - int idx = glyph_indices.indexOf(index); + qsizetype idx = glyph_indices.indexOf(index); if (idx < 0) { idx = glyph_indices.size(); glyph_indices.append(index); } - return idx; + return (int)idx; } #endif // QT_NO_PDF |