OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c82e9b
)
avoid temporary copy in QHash::unite()
author
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 11 Jul 2019 00:35:14 +0000
(
00:35
+0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 11 Jul 2019 00:35:14 +0000
(
00:35
+0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/tools/qhash.h
patch
|
blob
|
history
diff --git
a/src/core/tools/qhash.h
b/src/core/tools/qhash.h
index
f93078e
..
ee29d70
100644
(file)
--- a/
src/core/tools/qhash.h
+++ b/
src/core/tools/qhash.h
@@
-440,9
+440,8
@@
QHash<Key, T>::createNode(uint ah, const Key &akey, const T &avalue, Node **anex
template <class Key, class T>
Q_INLINE_TEMPLATE QHash<Key, T> &QHash<Key, T>::unite(const QHash<Key, T> &other)
{
- QHash<Key, T> copy(other);
- const_iterator it = copy.constEnd();
- while (it != copy.constBegin()) {
+ const_iterator it = other.constEnd();
+ while (it != other.constBegin()) {
--it;
insertMulti(it.key(), it.value());
}