mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Add in simulator info returns delta
This commit is contained in:
@@ -181,10 +181,15 @@ namespace BlackMisc
|
||||
return CValueObject::toIcon();
|
||||
}
|
||||
|
||||
void CSimulatorInfo::add(const CSimulatorInfo &other)
|
||||
CSimulatorInfo CSimulatorInfo::add(const CSimulatorInfo &other)
|
||||
{
|
||||
if (other.isUnspecified()) { return; }
|
||||
// anything to add?
|
||||
if (other.isUnspecified()) { return None; }
|
||||
if (this->matchesAll(other)) { return None; }
|
||||
|
||||
this->setSimulator(this->getSimulator() | other.getSimulator());
|
||||
const CSimulatorInfo delta(this->getSimulator() & other.getSimulator());
|
||||
return delta;
|
||||
}
|
||||
|
||||
QSet<CSimulatorInfo> CSimulatorInfo::asSingleSimulatorSet() const
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace BlackMisc
|
||||
CIcon toIcon() const;
|
||||
|
||||
//! Add simulator
|
||||
void add(const CSimulatorInfo &other);
|
||||
CSimulatorInfo add(const CSimulatorInfo &other);
|
||||
|
||||
//! As a set of single simulator info objects
|
||||
QSet<CSimulatorInfo> asSingleSimulatorSet() const;
|
||||
|
||||
Reference in New Issue
Block a user