mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55: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:
@@ -27,7 +27,7 @@ namespace BlackMisc
|
||||
int CAirportIcao::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CAirportIcao &>(otherBase);
|
||||
return this->m_icaoCode.compare(other.m_icaoCode, Qt::CaseInsensitive);
|
||||
return compare(TupleConverter<CAirportIcao>::toMetaTuple(*this), TupleConverter<CAirportIcao>::toMetaTuple(other));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -96,7 +96,7 @@ namespace BlackMisc
|
||||
bool CAirportIcao::operator ==(const CAirportIcao &other) const
|
||||
{
|
||||
if (this == &other) return true;
|
||||
return this->asString().compare(other.asString(), Qt::CaseInsensitive) == 0;
|
||||
return TupleConverter<CAirportIcao>::toMetaTuple(*this) == TupleConverter<CAirportIcao>::toMetaTuple(other);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user