summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qmap.qdoc
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-04-28 07:12:43 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-05-03 20:13:25 +0000
commit87e90a265f6b07b489ea249cc00b46f13e879d83 (patch)
treeb252c44f77aab5ff6d9e70ef87ef8e41f82c2178 /src/corelib/tools/qmap.qdoc
parent5a3ac484dbcc64c8ee7a57854fcdde6b4b067aaa (diff)
QVarLengthArray: simplify / optimize assign(It, It)
After many failed attempts at addressing my dissatisfaction with the if (n) checks, I finally realized that the problem is the while (first != last && end != end()) loop, which, when exited, gives no indication as to _why_ it was exited. Any attempt to re-construct the exit condition must needs re-check something that should be known already. To fix, then, use a while (true) loop and react on first == last and dst == end() separately. As a drive-by, cache end(). Task-number: QTBUG-106200 Change-Id: Ic873774451df4102163e6e65d93c35e5dcbbb037 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qmap.qdoc')
0 files changed, 0 insertions, 0 deletions