mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
refs #345 Added a metatuple flag for case insensitive comparisons, so CAirportIcao and CCallsign comparisons can use metatuples.
This commit is contained in:
@@ -85,7 +85,7 @@ namespace BlackMisc
|
||||
int CCallsign::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CCallsign &>(otherBase);
|
||||
return this->m_callsign.compare(other.m_callsign, Qt::CaseInsensitive);
|
||||
return compare(TupleConverter<CCallsign>::toMetaTuple(*this), TupleConverter<CCallsign>::toMetaTuple(other));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -181,7 +181,7 @@ namespace BlackMisc
|
||||
bool CCallsign::operator ==(const CCallsign &other) const
|
||||
{
|
||||
if (this == &other) return true;
|
||||
return this->asString().compare(other.asString(), Qt::CaseInsensitive) == 0;
|
||||
return TupleConverter<CCallsign>::toMetaTuple(*this) == TupleConverter<CCallsign>::toMetaTuple(other);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user