mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45: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
|
template <class MU, class PQ> uint CPhysicalQuantity<MU, PQ>::getValueHash() const
|
||||||
{
|
{
|
||||||
QList<uint> hashs;
|
QList<uint> hashs;
|
||||||
hashs << this->m_unit.getValueHash();
|
// there is no double qHash
|
||||||
hashs << qHash(static_cast<long>(this->m_value));
|
// also unit and rounding has to be considered
|
||||||
|
hashs << qHash(this->valueRoundedWithUnit(MU::defaultUnit()));
|
||||||
return BlackMisc::calculateHash(hashs, "PQ");
|
return BlackMisc::calculateHash(hashs, "PQ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user