ezEngine  Milestone 7
HashableStruct_inl.h
1 #include <Foundation/Algorithm/Hashing.h>
2 #include <Foundation/Memory/MemoryUtils.h>
3 
4 template<typename T> ezHashableStruct<T>::ezHashableStruct()
5 {
6  ezMemoryUtils::ZeroFill<T>(static_cast<T*>(this));
7 }
8 
9 template<typename T> ezUInt32 ezHashableStruct<T>::CalculateHash() const
10 {
11  return ezHashing::CRC32Hash(this, sizeof(T));
12 }
13