diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-05-21 20:18:34 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-05-23 08:03:31 +0000 |
commit | f437fb2934e56c293039dc3b00410c53596f9c3e (patch) | |
tree | 866f6bed78a92a1bc109668498ab0a0968a92b79 /src/corelib/tools/qhash.h | |
parent | 2ff0814aa27be63ae0e10ae84f2820e413b8d015 (diff) |
Qt containers: use std::move in take*() methods
Move the objects out of the data structure to avoid needless copies.
Change-Id: I1a69fccc431e040b229d6ea9ded0e041c208c861
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 8689243a98..d7378df746 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -825,7 +825,7 @@ Q_OUTOFLINE_TEMPLATE T QHash<Key, T>::take(const Key &akey) Node **node = findNode(akey); if (*node != e) { - T t = (*node)->value; + T t = std::move((*node)->value); Node *next = (*node)->next; deleteNode(*node); *node = next; |