mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
refs #413 Removed one overload of CRange::findBy and one of CSequence::applyIf; they were never used and they caused a circular dependency.
Templatized another overload of applyIf to break a circular dependency.
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
#define BLACKMISC_RANGE_H
|
||||
|
||||
#include "blackmiscexport.h"
|
||||
#include "propertyindexvariantmap.h"
|
||||
#include "iterator.h"
|
||||
#include "predicates.h"
|
||||
#include <QtGlobal>
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
#include <type_traits>
|
||||
#include <iterator>
|
||||
@@ -71,12 +71,6 @@ namespace BlackMisc
|
||||
inline auto findBy(K0 k0, V0 v0, KeysValues... keysValues) const
|
||||
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...))>>;
|
||||
|
||||
/*!
|
||||
* \brief Return a copy containing only those elements matching a given value map.
|
||||
*/
|
||||
inline auto findBy(CPropertyIndexVariantMap valueMap) const
|
||||
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::Equals(std::move(valueMap)))>>;
|
||||
|
||||
/*!
|
||||
* \brief Return true if there is an element for which a given predicate returns true.
|
||||
*/
|
||||
@@ -268,13 +262,6 @@ namespace BlackMisc
|
||||
return findBy(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...));
|
||||
}
|
||||
|
||||
template <class Derived, class CIt>
|
||||
auto CRangeBase<Derived, CIt>::findBy(CPropertyIndexVariantMap valueMap) const
|
||||
-> CRange<Iterators::ConditionalIterator<CIt, decltype(BlackMisc::Predicates::Equals(std::move(valueMap)))>>
|
||||
{
|
||||
return findBy(BlackMisc::Predicates::Equals(std::move(valueMap)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user