Skip to content

Commit

Permalink
QTextTable: fix an implicit uint->int conversion
Browse files Browse the repository at this point in the history
Make it explicit; didn't investigate why mixed comparisons are
used here.

Change-Id: Idd353c76a65ca1c8c4a158886f64c9cbb321494b
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
dangelog committed Oct 19, 2020
1 parent 4ea7fba commit c554f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/text/qtexttable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void QTextTablePrivate::fragmentAdded(QChar type, uint fragment)
if (blockFragmentUpdates)
return;
if (type == QTextBeginningOfFrame) {
Q_ASSERT(cells.indexOf(fragment) == -1);
Q_ASSERT(cells.indexOf(int(fragment)) == -1);
const uint pos = pieceTable->fragmentMap().position(fragment);
QFragmentFindHelper helper(pos, pieceTable->fragmentMap());
auto it = std::lower_bound(cells.begin(), cells.end(), helper);
Expand All @@ -421,7 +421,7 @@ void QTextTablePrivate::fragmentRemoved(QChar type, uint fragment)
if (blockFragmentUpdates)
return;
if (type == QTextBeginningOfFrame) {
Q_ASSERT(cells.indexOf(fragment) != -1);
Q_ASSERT(cells.indexOf(int(fragment)) != -1);
cells.removeAll(fragment);
if (fragment_start == fragment && cells.size()) {
fragment_start = cells.at(0);
Expand Down

0 comments on commit c554f9e

Please sign in to comment.