mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
This commit is contained in:
committed by
Mathew Sutcliffe
parent
67a5dbfe48
commit
a280d239e6
@@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "blackmisc/aviotransponder.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -136,6 +137,18 @@ namespace BlackMisc
|
||||
this->m_transponderMode = static_cast<TransponderMode>(tm);
|
||||
}
|
||||
|
||||
/*
|
||||
* Value hash
|
||||
*/
|
||||
uint CTransponder::getValueHash() const
|
||||
{
|
||||
QList<uint> hashs;
|
||||
hashs << qHash(this->m_name);
|
||||
hashs << qHash(this->m_transponderCode);
|
||||
hashs << qHash(this->m_transponderMode);
|
||||
return BlackMisc::calculateHash(hashs, "CTransponder");
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata of unit and quantity
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user