mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Utility function allows to remove multiple callsigns
This commit is contained in:
@@ -119,6 +119,12 @@ namespace BlackMisc
|
||||
return this->container().removeIf(&OBJ::getCallsign, callsign);
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
int ICallsignObjectList<OBJ, CONTAINER>::removeByCallsigns(const CCallsignSet &callsigns)
|
||||
{
|
||||
return this->container().removeIf([ & ](const OBJ &obj) { return callsigns.contains(obj.getCallsign()); });
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
QMap<QString, int> ICallsignObjectList<OBJ, CONTAINER>::getSuffixes() const
|
||||
{
|
||||
@@ -209,4 +215,3 @@ namespace BlackMisc
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@ namespace BlackMisc
|
||||
//! Remove all objects with callsign
|
||||
int removeByCallsign(const CCallsign &callsign);
|
||||
|
||||
//! Remove all objects with callsigns
|
||||
int removeByCallsigns(const CCallsignSet &callsigns);
|
||||
|
||||
//! All suffixes with their respective count
|
||||
QMap<QString, int> getSuffixes() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user