forked from qt-creator/qt-creator
Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits. Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -55,21 +55,15 @@ public:
|
||||
|
||||
int iconTypeSortOrder() const;
|
||||
|
||||
friend auto qHash(const SymbolInformation &information) { return information.hash(); }
|
||||
|
||||
private:
|
||||
const int m_iconType;
|
||||
const Utils::QHashValueType m_hash; // precalculated hash value - to speed up qHash
|
||||
const QString m_name; // symbol name (e.g. SymbolInformation)
|
||||
const QString m_type; // symbol type (e.g. (int char))
|
||||
|
||||
};
|
||||
|
||||
//! qHash overload for QHash/QSet
|
||||
inline auto qHash(const SymbolInformation &information)
|
||||
{
|
||||
return information.hash();
|
||||
}
|
||||
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClassView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user