summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkrequest.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2016-01-17 14:49:43 +0100
committerMarc Mutz <[email protected]>2016-01-29 06:16:28 +0000
commit49388f3dfde04a52cfc80cd628c2bc9af92a19e6 (patch)
treed2f1509853b3565a336bd9c4e20f41ef32e554c1 /src/network/access/qnetworkrequest.cpp
parent587c183608f13dd77407bcbcc3012e7520ce9006 (diff)
QGraphicsAnchorLayout: return a struct instead of a QList
... of QLists. The returned list was only ever exactly of size one or two, and two only if a local QList in the getGraphParts() function was not empty. Instead of using a QList to return those QLists, use a small struct of two QLists. This way, we avoid copying, memory allocations, and the code becomes a lot clearer, because we can give the members of the struct meaningful names, instead of at(0) and at(1). As a consequence, at the call site, the loop over the result can now be collapsed into an if. Saves ~1200b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I5c2a3b3be0edcc418b310551abca51c410aca7c8 Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
0 files changed, 0 insertions, 0 deletions