diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-13 20:12:23 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-06-20 20:19:14 +0200 |
commit | 84536ae61ed887f179deafb75fd28757f1cf9aba (patch) | |
tree | f9a356919b3d8979560c1356a6602519f1472bbf /src/gui/text/qtextdocument.h | |
parent | 041a5ff076e923b34e4675d753018be806d56308 (diff) |
QNetworkAcesssCache: replace a QQueue with a std::vector
The code didn't really use the queue as a queue, because it enqueued
one at a time, but dequeued potentially many. Even if it actually
decays to actual queue behavior: for the small number of elements
expected, a vector would still be preferable over the per-element
allocation performed by QQueue.
Because std::vector doesn't have pop_front(), I took the liberty of
making the dequeue code easier to read by using find_if with an
aptly-named lambda.
Change-Id: I09bd7ede50cb8ab5af5d1fc2ede37a3731f67070
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocument.h')
0 files changed, 0 insertions, 0 deletions