diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-01 15:17:27 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-02 12:46:41 +0000 |
commit | ed9f8a0e9d2984b0b9d6aa31ab3a7209bae1708e (patch) | |
tree | c0f7b12c7a5e2a0f78823eb53bbd7391280a061a /configure.pri | |
parent | 73331eebf885ba8918447d26ba37bef2208bdb5e (diff) |
bearer plugins: eradicate Java-style iterators and Q_FOREACH
This is the simple part of the job, removing Q_FOREACH loops
which are obviously safe to be replaced by C++11 range-for.
In QNetworkManagerEngine::sessionStateForId(), instead of
iterating over QHash::keys(), iterate over the QHash
directly (using C++11 range-for, as we're only using the
values, not the keys).
In QNetworkManagerEngine::connectToId(), simplify the loop
body by merging three identical if blocks into one.
Saves ~1.7KiB accumulated over the three Linux bearer plugins:
connman, generic, nm (optimized GCC 6.1 Linux AMD64 build).
Change-Id: Ic66139c25f7e2173f5a919927e269b873334d2c8
Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
Diffstat (limited to 'configure.pri')
0 files changed, 0 insertions, 0 deletions