mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Fixed hash for PQ, was based on long
(which of course did not work properly)
This commit is contained in:
@@ -270,8 +270,9 @@ namespace BlackMisc
|
||||
template <class MU, class PQ> uint CPhysicalQuantity<MU, PQ>::getValueHash() const
|
||||
{
|
||||
QList<uint> hashs;
|
||||
hashs << this->m_unit.getValueHash();
|
||||
hashs << qHash(static_cast<long>(this->m_value));
|
||||
// there is no double qHash
|
||||
// also unit and rounding has to be considered
|
||||
hashs << qHash(this->valueRoundedWithUnit(MU::defaultUnit()));
|
||||
return BlackMisc::calculateHash(hashs, "PQ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user