mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #614, changed matcher and applied changes
* new function in model list * removed all models in matcher, only provider data will be used
This commit is contained in:
@@ -215,6 +215,44 @@ namespace BlackMisc
|
||||
return c;
|
||||
}
|
||||
|
||||
int CAircraftModelList::removeAllWithoutModelString()
|
||||
{
|
||||
if (this->isEmpty()) { return 0; }
|
||||
int c = 0;
|
||||
for (auto it = this->begin(); it != this->end();)
|
||||
{
|
||||
if (it->hasModelString())
|
||||
{
|
||||
++it;
|
||||
}
|
||||
else
|
||||
{
|
||||
c++;
|
||||
it = this->erase(it);
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
int CAircraftModelList::removeIfExcluded()
|
||||
{
|
||||
if (this->isEmpty()) { return 0; }
|
||||
int c = 0;
|
||||
for (auto it = this->begin(); it != this->end();)
|
||||
{
|
||||
if (it->getModelMode() != CAircraftModel::Exclude)
|
||||
{
|
||||
++it;
|
||||
}
|
||||
else
|
||||
{
|
||||
c++;
|
||||
it = this->erase(it);
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
int CAircraftModelList::replaceOrAddModelsWithString(const CAircraftModelList &addOrReplaceList, Qt::CaseSensitivity sensitivity)
|
||||
{
|
||||
if (addOrReplaceList.isEmpty()) { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user