QTextTable: fix an implicit uint->int conversion

Make it explicit; didn't investigate why mixed comparisons are
used here.

Change-Id: Idd353c76a65ca1c8c4a158886f64c9cbb321494b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2020-10-16 16:10:39 +02:00
parent 4ea7fbaf00
commit c554f9ef0a

View File

@ -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);
@ -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);