mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 17:30:12 +08:00
refactor: Remove unused method
This commit is contained in:
@@ -13,28 +13,4 @@ namespace BlackMisc::Network
|
||||
|
||||
CClientList::CClientList(const CSequence &other) : CSequence<CClient>(other)
|
||||
{}
|
||||
|
||||
bool CClientList::hasCapability(const Aviation::CCallsign &callsign, CClient::Capability capability) const
|
||||
{
|
||||
return this->getCapabilities(callsign).testFlag(capability);
|
||||
}
|
||||
|
||||
CClient::Capabilities CClientList::getCapabilities(const Aviation::CCallsign &callsign) const
|
||||
{
|
||||
if (this->isEmpty()) { return static_cast<CClient::Capabilities>(CClient::None); }
|
||||
return this->findFirstByCallsign(callsign).getCapabilities();
|
||||
}
|
||||
|
||||
CClientList CClientList::filterPilotsByCallsign(const CCallsignSet &callsigns) const
|
||||
{
|
||||
CClientList filtered;
|
||||
for (const CClient &client : *this)
|
||||
{
|
||||
if (client.isAtc() || callsigns.contains(client.getCallsign()))
|
||||
{
|
||||
filtered.push_back(client);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -33,15 +33,6 @@ namespace BlackMisc::Network
|
||||
|
||||
//! Construct from a base class object.
|
||||
CClientList(const CSequence &other);
|
||||
|
||||
//! Has client for callsign the given capability?
|
||||
bool hasCapability(const Aviation::CCallsign &callsign, CClient::Capability capability) const;
|
||||
|
||||
//! Capabilities of client for callsign
|
||||
CClient::Capabilities getCapabilities(const Aviation::CCallsign &callsign) const;
|
||||
|
||||
//! Filter pilots by callsign in set
|
||||
CClientList filterPilotsByCallsign(const Aviation::CCallsignSet &callsigns) const;
|
||||
};
|
||||
|
||||
//! Client per callsign
|
||||
|
||||
Reference in New Issue
Block a user