diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-11-30 11:03:29 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-07 13:41:17 +0000 |
commit | bc6d677b7e9c7809af68d8bcbd3a5793903c4c98 (patch) | |
tree | 4caa4d182a62975b0e10c996dc72419d3337285e /src/widgets/widgets/qdockarealayout_p.h | |
parent | 1264c22b8670a0d999ab5f7983407838e3766126 (diff) |
QApplication: replace some sneaky code with a strategic goto
Instead of replacing the container iterated over, in the middle
of the loop body(!), place a label in front of the loop and
use goto to restart the entire loop.
This allows to mark the variable 'list' const, which is a
prerequesite for replacing the loop with a C++11 range-for
one.
But it also makes the code less cryptic. No-one expects the
container to be re-seated in the middle of the loop.
The compiler agrees: saves 144b of text size on optimized
AMD64 GCC 4.9 Linux builds.
Change-Id: I22d07672a1bbe9d7ffb083ae231eda760c29d350
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets/qdockarealayout_p.h')
0 files changed, 0 insertions, 0 deletions