diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-11-30 12:19:31 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-23 09:14:07 +0000 |
commit | 2d4295f16761a0e47b5218bbb1db5c14d16ce4fe (patch) | |
tree | ade31a18b55496d4c77fce1b18331917eb8362c0 /src/gui | |
parent | 4e628397b0ef6f8d5e9294e85507488cebe740f3 (diff) |
QGraphicsView: replace some Q_FOREACH loops over const locals with C++11 range-for
This needs to be handled a bit carefully, because Qt containers
will detach upon being iterated over using range-for.
In the cases of this patch, that cannot happen, because all
containers are local and marked as const (either by this patch
or before).
Separate patches will deal with other situations.
Range-for loops are much more efficient than foreach loops.
This patch shaves ~1.8KiB of text size off an optimized Linux
AMD64 GCC 4.9 build.
Change-Id: I5c58658937ac4323594161bf94a2fce3c5667914
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui')
0 files changed, 0 insertions, 0 deletions