From 41decc0bde0881ae3cbac661f9bc469e82a8feeb Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 29 Jan 2022 20:02:20 +0200 Subject: [PATCH] remove unused QTextEngine::getClusterLength() argument Signed-off-by: Ivailo Monev --- src/gui/text/qtextengine.cpp | 8 ++++---- src/gui/text/qtextengine_p.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 067d4da7c..f7cea5742 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1190,13 +1190,13 @@ QFixed QTextEngine::offsetInLigature(const QScriptItem *si, int pos, int max, in return 0; } -// Scan in logClusters[from..to-1] for glyph_pos +// Scan in logClusters[0..to-1] for glyph_pos int QTextEngine::getClusterLength(unsigned short *logClusters, const HB_CharAttributes *attributes, - int from, int to, int glyph_pos, int *start) + int to, int glyph_pos, int *start) { int clusterLength = 0; - for (int i = from; i < to; i++) { + for (int i = 0; i < to; i++) { if (logClusters[i] == glyph_pos && attributes[i].charStop) { if (*start < 0) *start = i; @@ -1238,7 +1238,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end, const HB_CharAttributes *attrs = attributes(); logClusters = this->logClusters(si); - clusterLength = getClusterLength(logClusters, attrs, 0, end, glyph_pos, &clusterStart); + clusterLength = getClusterLength(logClusters, attrs, end, glyph_pos, &clusterStart); if (clusterLength) { const QGlyphLayout &glyphs = shapedGlyphs(si); diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index ca1e7097c..64d0cc263 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -469,7 +469,7 @@ private: void shapeTextWithHarfbuzz(int item) const; void resolveAdditionalFormats() const; - int getClusterLength(unsigned short *logClusters, const HB_CharAttributes *attributes, int from, int to, int glyph_pos, int *start); + int getClusterLength(unsigned short *logClusters, const HB_CharAttributes *attributes, int to, int glyph_pos, int *start); }; struct QTextLineItemIterator -- 2.11.0