Fix error with Assignment::Type not being hashable

This commit is contained in:
Ryan Huffman 2015-08-19 11:55:06 -07:00
parent 121d3a77ad
commit d18ce5066f
2 changed files with 9 additions and 0 deletions

View file

@ -159,3 +159,10 @@ QDataStream& operator>>(QDataStream &in, Assignment& assignment) {
return in;
}
uint qHash(const Assignment::Type& key, uint seed) {
// seems odd that Qt couldn't figure out this cast itself, but this fixes a compile error after switch to
// strongly typed enum for PacketType
return qHash((uint8_t) key, seed);
}

View file

@ -100,4 +100,6 @@ protected:
QUuid _walletUUID; /// the UUID for the wallet that should be paid for this assignment
};
uint qHash(const Assignment::Type& key, uint seed);
#endif // hifi_Assignment_h