Use XOR instead of OR in order to avoid saturating all bits when computing the
hash value.
Change-Id: I50b1a044eb827239dae1c04732ca6a065f6233b4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
}
inline uint hashCode() const {
if(!hash)
- hash = qHash(string) | qHash(flags) /*| qHash(pwd)*/;
+ hash = qHash(string) ^ qHash(flags) /*^ qHash(pwd)*/;
return hash;
}
};
}
inline uint hashCode() const {
if(!hash)
- hash = qHash(file) /*| qHash(pwd)*/;
+ hash = qHash(file) /*^ qHash(pwd)*/;
return hash;
}
inline bool isRelativePath(const QString &file) {
bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
inline uint hashCode() const {
if(!hash)
- hash = qHash(var) | qHash(in) | qHash(out) /*| qHash(pwd)*/;
+ hash = qHash(var) ^ qHash(in) ^ qHash(out) /*^ qHash(pwd)*/;
return hash;
}
};