summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-04-07 14:37:42 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-04-08 07:11:30 +0200
commitf90c82488a57079fe7568f4eaba23a631686f30f (patch)
tree11e854250c52c96007aba4da6a95544ed08092a6 /tests
parentb5f27b91648bb56508c1b9c6e48e11f772dd28f5 (diff)
QBluetoothServiceDiscoveryAgentPrivate: fix broken remove loop
There were two problems with the loop: First, it's quadratic, because it's calling the linear-complexity removeAt() function in a loop. Second, it was broken in that it was failing to check items that were immediately following matches, because it unconditionally increased the index variable, even if it has removedAt() an element. Fix by using erase_if() + named lambda. Pick-to: 6.3 6.2 Change-Id: I75d68e43995bea95ffcbd2eb2683d4636a250c1d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions