TaskTree: Add hash function for TreeStorageBase

Change-Id: Ia9242e3ca90ab13ee93fa42ebf86d03cc04fb669
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-12-04 10:03:51 +01:00
parent cb8d4797b7
commit 8aa7ec1072
2 changed files with 11 additions and 0 deletions

View File

@@ -14,6 +14,11 @@ bool TreeStorageBase::isValid() const
return m_storageData && m_storageData->m_constructor && m_storageData->m_destructor;
}
size_t TreeStorageBase::hash(uint seed) const
{
return size_t(m_storageData.get()) ^ seed;
}
TreeStorageBase::TreeStorageBase(StorageConstructor ctor, StorageDestructor dtor)
: m_storageData(new StorageData{ctor, dtor}) { }