summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qscopeguard.qdoc
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-03-30 17:09:32 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-04-06 16:46:59 +0200
commitd11941db41f00525f907417bbcd6ac5ee30d8485 (patch)
treeffcc5ad3b6d82252ae0128272afe63af1b30db73 /src/corelib/tools/qscopeguard.qdoc
parent87098106d0efc7c6e0b7eb01ffa72f27b47b85d5 (diff)
Q[Multi]Hash::reserve(): do nothing if desired size is less than current
Calling Q[Multi]Hash::reserve(n) when n is much smaller than the current amount of elements in the hash, could result in an infinite loop, because at some point the algorithm could not find a free bucket for the element. Fixing it by returning early if the new desired capacity is less than current. Fixes: QTBUG-102067 Pick-to: 6.3 6.2 Change-Id: I38ef0b2168c4e2a317eedf91b2155b1fdffb1c27 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qscopeguard.qdoc')
0 files changed, 0 insertions, 0 deletions