refs #345 Added a metatuple flag for case insensitive comparisons, so CAirportIcao and CCallsign comparisons can use metatuples.

This commit is contained in:
Mathew Sutcliffe
2014-10-31 23:10:17 +00:00
parent 1283d50737
commit ecf8e6aafb
6 changed files with 59 additions and 22 deletions

View File

@@ -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);
}
/*