mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
Issue #77 Remove outdated function
This commit is contained in:
@@ -74,7 +74,7 @@ namespace BlackSample
|
||||
// now Jane's time is over
|
||||
CPropertyIndexVariantMap anotherController;
|
||||
anotherController.addValue(CAtcStation::IndexController, CVariant::fromValue(CUser("445566", "Fuzzy")));
|
||||
atcList.applyIf(BlackMisc::Predicates::Matches(newController), anotherController);
|
||||
atcList.applyIf([ = ](const auto &arg) { return newController.matches(arg); }, anotherController);
|
||||
|
||||
qDebug() << "-- after update via value map";
|
||||
qDebug() << atcList.toQString();
|
||||
|
||||
@@ -21,17 +21,6 @@ namespace BlackMisc
|
||||
|
||||
namespace Predicates
|
||||
{
|
||||
namespace Private
|
||||
{
|
||||
//! \private
|
||||
struct Matches
|
||||
{
|
||||
const CPropertyIndexVariantMap &m_map;
|
||||
Matches(const CPropertyIndexVariantMap &map) : m_map(map) {}
|
||||
template <class T> bool operator()(const T &value) const;
|
||||
};
|
||||
}
|
||||
|
||||
/*!
|
||||
* Predicate which tests whether some member functions return some values.
|
||||
* \param vs Pairs of { pointer to member function of T, value to compare it against }.
|
||||
@@ -111,14 +100,6 @@ namespace BlackMisc
|
||||
};
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns a predicate that returns true if its argument matches a captured CPropertyIndexVariantMap.
|
||||
*/
|
||||
inline auto Matches(const CPropertyIndexVariantMap &map) -> Private::Matches
|
||||
{
|
||||
return { map };
|
||||
}
|
||||
|
||||
} //namespace Predicates
|
||||
} //namespace BlackMisc
|
||||
|
||||
|
||||
@@ -312,12 +312,6 @@ namespace BlackMisc
|
||||
return derived()->toQString().compare(compareValue.toQString());
|
||||
}
|
||||
} // Mixin
|
||||
|
||||
template <class T>
|
||||
bool Predicates::Private::Matches::operator()(const T &value) const
|
||||
{
|
||||
return m_map.matches(value);
|
||||
}
|
||||
} // ns
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::CPropertyIndexVariantMap)
|
||||
|
||||
Reference in New Issue
Block a user