[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:07:23 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=bdb39f2

The following commit has been merged in the master branch:
commit bdb39f290247fbb7255191f42feae2dbefce5d60
Author: Vishesh Handa <handa.vish at gmail.com>
Date:   Sat Dec 24 23:59:25 2011 +0530

    Mini Optimization: Reserve the length of the string in qHash
    
    The qHash is called a LOT of times. We might as well optimize it a little bit.
---
 kpeople/nepomuk-feeder/nepomuk-storage.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kpeople/nepomuk-feeder/nepomuk-storage.cpp b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
index 296ee53..b276b62 100644
--- a/kpeople/nepomuk-feeder/nepomuk-storage.cpp
+++ b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
@@ -1159,7 +1159,9 @@ void NepomukStorage::setContactAvatar(const QString &path,
 int qHash(ContactIdentifier c)
 {
     // FIXME: This is a shit way of doing it.
-    QString temp = c.accountId();
+    QString temp;
+    temp.reserve( c.accountId().size() + 8 + c.contactId().size() );
+    temp.append(c.accountId());
     temp.append(QLatin1String("#--__--#"));
     temp.append(c.contactId());
     return qHash(temp);

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list