[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: faster kconfig
From: aleXXX <alexander.neundorf () rz ! tu-ilmenau ! de>
Date: 2001-02-27 9:11:49
[Download RAW message or body]
Hi,
I tried the following in kconfigdata.h but it didn't work correctly, suddenly
no icons where loaded anymore, I don't know why. I recompiled only libkdecore.
The two added lines would save again some thousands qstrcmps() on startup for
the most simply KDE 2 app and keep a unambigous order for the used QMap.
Maybe it would have been enough to recompile some other stuff too, I don't
know.
inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
{
+ if (k1.mGroup.size()!=k2.mGroup.size())
+ return (k1.mGroup.size()<k2.mGroup.size());
register int result=qstrcmp(k1.mGroup.data(),k2.mGroup.data());
if (result!=0)
return (result<0);
if (!k1.c_key && k2.c_key)
return true;
if (k1.c_key && k2.c_key)
result = strcmp(k1.c_key, k2.c_key);
if (result != 0)
return result < 0;
return (!k1.bLocal && k2.bLocal);
}
Btw., why do we install kconfigdata.h ?
I'm not sure, but I think it might make apps binary incompatible if we would
change e.g. the operator<() and try to run an app where the operator might be
compiled in with a new compiled lib which might have a different but still
unique sort order.
Bye
Alex
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic