rendered paste body--- kconfigdata.h (revision 722049)
+++ kconfigdata.h (working copy)
@@ -101,19 +101,16 @@
*/
inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
{
- if (k1.mGroup != k2.mGroup)
- return k1.mGroup < k2.mGroup;
+ int result = qstrcmp(k1.mGroup.constData(), k2.mGroup.constData());
+ if (result != 0) {
+ return result < 0;
+ }
- const char *const c_key1 = k1.mKey.constData();
- const char *const c_key2 = k2.mKey.constData();
- if (!c_key1 && c_key2)
- return true;
+ result = qstrcmp(k1.mKey.constData(), k2.mKey.constData());
+ if (result != 0) {
+ return result < 0;
+ }
- int result = 0;
- if (c_key1 && c_key2)
- result = qstrcmp(c_key1, c_key2);
- if (result != 0)
- return result < 0;
if (k1.bLocal != k2.bLocal)
return k2.bLocal;
return (!k1.bDefault && k2.bDefault);