diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-25 14:43:43 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-28 07:26:52 +0000 |
commit | 9366a8be1eb7cfa5a5cb3650ae6230b46bb7e538 (patch) | |
tree | 8fc57b6e91f62d129b657b04f468a30f6f4a8449 /mkspecs | |
parent | b393641888f18e3accf094c91808e2189c2138cc (diff) |
Add an early-out to QVector::operator+= and QHash::unite for empty LHS
If the container being added to is default constructed and has never
been modified, we don't have to do all the checking and iterating.
Instead we can just assign with operator=.
If the LHS is merely empty, we could lose reserve()d capacity, so only
do this for a shared-null LHS.
Change-Id: If1e3342662d10833babc7ab847ada0285073723b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'mkspecs')
0 files changed, 0 insertions, 0 deletions