mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
refactor: Fix readability-use-anyofallof
This commit is contained in:
@@ -43,6 +43,7 @@ Checks: >
|
||||
modernize-use-uncaught-exceptions,
|
||||
modernize-use-using,
|
||||
readability-use-std-min-max,
|
||||
readability-use-anyofallof,
|
||||
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
|
||||
@@ -30,15 +30,10 @@ namespace swift::core::application
|
||||
//! \copydoc swift::misc::TSettingTrait::isValid
|
||||
static bool isValid(const misc::input::CActionHotkeyList &value, QString &)
|
||||
{
|
||||
for (const auto &actionHotkey : value)
|
||||
{
|
||||
if (actionHotkey.getApplicableMachine().getMachineName().isEmpty() ||
|
||||
actionHotkey.getAction().isEmpty() || actionHotkey.getCombination().isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return std::all_of(value.cbegin(), value.cend(), [](const auto &actionHotkey) {
|
||||
return !actionHotkey.getApplicableMachine().getMachineName().isEmpty() &&
|
||||
!actionHotkey.getAction().isEmpty() && !actionHotkey.getCombination().isEmpty();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -66,14 +61,9 @@ namespace swift::core::application
|
||||
//! \copydoc swift::misc::TSettingTrait::isValid
|
||||
static bool isValid(const QStringList &pluginIdentifiers, QString &)
|
||||
{
|
||||
for (const QString &pluginIdentifier : pluginIdentifiers)
|
||||
{
|
||||
if (!misc::simulation::CSimulatorPluginInfo::allIdentifiers().contains(pluginIdentifier))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return std::all_of(pluginIdentifiers.cbegin(), pluginIdentifiers.cend(), [](const auto &pluginIdentifier) {
|
||||
return misc::simulation::CSimulatorPluginInfo::allIdentifiers().contains(pluginIdentifier);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -53,11 +53,8 @@ namespace swift::core::context
|
||||
|
||||
bool CContextAudio::hasRegisteredAudioCallsign(const CCallsign &callsign) const
|
||||
{
|
||||
for (const CCallsign &cs : m_registeredCallsigns.values())
|
||||
{
|
||||
if (callsign == cs) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(m_registeredCallsigns.begin(), m_registeredCallsigns.end(),
|
||||
[&](const CCallsign &cs) { return callsign == cs; });
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CContextAudio::getRegisteredDevices() const { return m_registeredDevices; }
|
||||
|
||||
@@ -125,56 +125,43 @@ namespace swift::core::db
|
||||
|
||||
bool CDatabaseReaderConfigList::possiblyReadsFromSwiftDb() const
|
||||
{
|
||||
for (const CDatabaseReaderConfig &config : *this)
|
||||
{
|
||||
if (config.possiblyReadsFromSwiftDb()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(),
|
||||
[](const CDatabaseReaderConfig &config) { return config.possiblyReadsFromSwiftDb(); });
|
||||
}
|
||||
|
||||
bool CDatabaseReaderConfigList::possiblyWritesToSwiftDb() const
|
||||
{
|
||||
for (const CDatabaseReaderConfig &config : *this)
|
||||
{
|
||||
if (config.possiblyWritesToSwiftDb()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(),
|
||||
[](const CDatabaseReaderConfig &config) { return config.possiblyWritesToSwiftDb(); });
|
||||
}
|
||||
|
||||
bool CDatabaseReaderConfigList::needsSharedInfoObjects(CEntityFlags::Entity entities) const
|
||||
{
|
||||
for (const CDatabaseReaderConfig &config : *this)
|
||||
{
|
||||
if (!config.supportsEntities(entities)) { continue; }
|
||||
if (config.needsSharedInfoFile()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CDatabaseReaderConfig &config) {
|
||||
return config.supportsEntities(entities) && config.needsSharedInfoFile();
|
||||
});
|
||||
}
|
||||
|
||||
bool CDatabaseReaderConfigList::needsSharedInfoFile(CEntityFlags::Entity entities) const
|
||||
{
|
||||
for (const CDatabaseReaderConfig &config : *this)
|
||||
{
|
||||
if (!config.supportsEntities(entities)) { continue; }
|
||||
if (config.needsSharedInfoFile()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CDatabaseReaderConfig &config) {
|
||||
return config.supportsEntities(entities) && config.needsSharedInfoFile();
|
||||
});
|
||||
}
|
||||
|
||||
bool CDatabaseReaderConfigList::needsSharedInfoObjectsIfCachesEmpty(CEntityFlags::Entity entities,
|
||||
CEntityFlags::Entity cachedEntities) const
|
||||
{
|
||||
for (const CDatabaseReaderConfig &config : *this)
|
||||
{
|
||||
if (!config.supportsEntities(entities)) { continue; }
|
||||
if (!config.needsSharedInfoFile()) { continue; }
|
||||
if (!config.getRetrievalMode().testFlag(CDbFlags::Cached)) { return true; } // does not support caching
|
||||
return std::any_of(this->begin(), this->end(),
|
||||
[&entities, &cachedEntities](const CDatabaseReaderConfig &config) {
|
||||
if (!config.supportsEntities(entities)) return false;
|
||||
if (!config.needsSharedInfoFile()) return false;
|
||||
if (!config.getRetrievalMode().testFlag(CDbFlags::Cached)) return true;
|
||||
|
||||
const CEntityFlags::Entity configEntities = config.getEntities();
|
||||
const CEntityFlags::Entity configEntitiesNotCached = configEntities & ~cachedEntities;
|
||||
if (configEntitiesNotCached != CEntityFlags::NoEntity) { return true; } // we have entities not yet cached
|
||||
}
|
||||
return false;
|
||||
const CEntityFlags::Entity configEntities = config.getEntities();
|
||||
const CEntityFlags::Entity configEntitiesNotCached = configEntities & ~cachedEntities;
|
||||
return configEntitiesNotCached != CEntityFlags::NoEntity;
|
||||
});
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CDatabaseReaderConfigList::getEntitesCachedOrReadFromDB() const
|
||||
|
||||
@@ -52,12 +52,8 @@ namespace swift::core
|
||||
if (!data.contains("identifier") || !data["identifier"].isString()) { return false; }
|
||||
|
||||
auto iids = acceptedIids();
|
||||
for (const QString &iid : iids)
|
||||
{
|
||||
if (metadata["IID"].toString() == iid) { return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
return std::any_of(iids.cbegin(), iids.cend(),
|
||||
[&](const QString &iid) { return metadata["IID"].toString() == iid; });
|
||||
}
|
||||
|
||||
QString IPluginManager::pluginIdentifier(const QJsonObject &metadata) const
|
||||
|
||||
@@ -201,11 +201,8 @@ namespace swift::gui::models
|
||||
|
||||
bool CColumns::hasAnyWidthPercentage() const
|
||||
{
|
||||
for (const CColumn &c : m_columns)
|
||||
{
|
||||
if (c.hasWidthPercentage()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(m_columns.cbegin(), m_columns.cend(),
|
||||
[](const CColumn &c) { return c.hasWidthPercentage(); });
|
||||
}
|
||||
|
||||
void CColumns::setWidthPercentages(const QList<int> &percentages)
|
||||
|
||||
@@ -121,11 +121,9 @@ namespace swift::misc::audio
|
||||
bool CAudioDeviceInfoList::hasSameDevices(const CAudioDeviceInfoList &compareDevices) const
|
||||
{
|
||||
if (compareDevices.size() != this->size()) { return false; }
|
||||
for (const CAudioDeviceInfo &d : *this)
|
||||
{
|
||||
if (!compareDevices.findRegisteredDeviceOrDefault(d).isValid()) { return false; }
|
||||
}
|
||||
return true;
|
||||
return std::all_of(cbegin(), cend(), [&](const CAudioDeviceInfo &d) {
|
||||
return compareDevices.findRegisteredDeviceOrDefault(d).isValid();
|
||||
});
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CAudioDeviceInfoList::allInputDevices()
|
||||
|
||||
@@ -74,11 +74,9 @@ namespace swift::misc::aviation
|
||||
|
||||
bool CAircraftSituationList::areAllOnGroundDetailsSame(COnGroundInfo::OnGroundDetails details) const
|
||||
{
|
||||
for (const CAircraftSituation &situation : *this)
|
||||
{
|
||||
if (situation.getOnGroundInfo().getGroundDetails() != details) { return false; }
|
||||
}
|
||||
return true;
|
||||
return std::all_of(cbegin(), cend(), [&](const CAircraftSituation &situation) {
|
||||
return situation.getOnGroundInfo().getGroundDetails() == details;
|
||||
});
|
||||
}
|
||||
|
||||
bool CAircraftSituationList::isConstOnGround() const
|
||||
@@ -242,11 +240,9 @@ namespace swift::misc::aviation
|
||||
|
||||
bool CAircraftSituationList::containsPushBack() const
|
||||
{
|
||||
for (const CAircraftSituation &situation : *this)
|
||||
{
|
||||
if (situation.getGroundSpeed().isNegativeWithEpsilonConsidered()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [](const CAircraftSituation &situation) {
|
||||
return situation.getGroundSpeed().isNegativeWithEpsilonConsidered();
|
||||
});
|
||||
}
|
||||
|
||||
int CAircraftSituationList::countOnGround(COnGroundInfo::IsOnGround og) const
|
||||
|
||||
@@ -402,11 +402,7 @@ namespace swift::misc::aviation
|
||||
{
|
||||
if (!callsign.contains("_")) { return false; }
|
||||
const QStringView uc = callsign.toUpper();
|
||||
|
||||
for (const QString &r : CCallsign::atcAlikeCallsignSuffixes())
|
||||
{
|
||||
if (uc.endsWith(r)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(CCallsign::atcAlikeCallsignSuffixes().cbegin(), CCallsign::atcAlikeCallsignSuffixes().cend(),
|
||||
[&](const QString &r) { return uc.endsWith(r); });
|
||||
}
|
||||
} // namespace swift::misc::aviation
|
||||
|
||||
@@ -46,12 +46,10 @@ namespace swift::misc::db
|
||||
bool CArtifact::isWithDistribution(const CDistribution &distribution, bool acceptMoreStableDistributions) const
|
||||
{
|
||||
if (distribution.isEmpty() || !this->hasDistributions()) { return false; }
|
||||
for (const CDistribution &dist : this->getDistributions())
|
||||
{
|
||||
if (dist == distribution) { return true; }
|
||||
if (acceptMoreStableDistributions && dist.isStabilityBetter(distribution)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(
|
||||
this->getDistributions().cbegin(), this->getDistributions().cend(), [&](const CDistribution &dist) {
|
||||
return dist == distribution || (acceptMoreStableDistributions && dist.isStabilityBetter(distribution));
|
||||
});
|
||||
}
|
||||
|
||||
CRemoteFile CArtifact::asRemoteFile() const
|
||||
|
||||
@@ -241,22 +241,17 @@ namespace swift::misc::db
|
||||
//! Any object without key?
|
||||
bool containsAnyObjectWithoutKey() const
|
||||
{
|
||||
for (const OBJ &obj : ITimestampObjectList<OBJ, CONTAINER>::container())
|
||||
{
|
||||
if (!obj.hasValidDbKey()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(ITimestampObjectList<OBJ, CONTAINER>::container().cbegin(),
|
||||
ITimestampObjectList<OBJ, CONTAINER>::container().cend(),
|
||||
[](const OBJ &obj) { return !obj.hasValidDbKey(); });
|
||||
}
|
||||
|
||||
//! Contains object with key?
|
||||
bool containsDbKey(KEYTYPE key) const
|
||||
{
|
||||
for (const OBJ &obj : ITimestampObjectList<OBJ, CONTAINER>::container())
|
||||
{
|
||||
if (!obj.hasValidDbKey()) { continue; }
|
||||
if (obj.getDbKey() == key) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(ITimestampObjectList<OBJ, CONTAINER>::container().cbegin(),
|
||||
ITimestampObjectList<OBJ, CONTAINER>::container().cend(),
|
||||
[&](const OBJ &obj) { return obj.hasValidDbKey() && obj.getDbKey() == key; });
|
||||
}
|
||||
|
||||
//! From multiple JSON formats
|
||||
|
||||
@@ -58,12 +58,10 @@ namespace swift::misc
|
||||
|
||||
if (!recursively) { return false; }
|
||||
const QStringList relSubDirs = CDirectoryUtils::getRelativeSubDirectories(dir);
|
||||
for (const QString &relSubDir : relSubDirs)
|
||||
{
|
||||
return std::any_of(relSubDirs.cbegin(), relSubDirs.cend(), [&](const QString &relSubDir) {
|
||||
const QString absSubDir = CFileUtils::appendFilePaths(directory.absolutePath(), relSubDir);
|
||||
if (CDirectoryUtils::containsFileInDir(absSubDir, filter, recursively)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return CDirectoryUtils::containsFileInDir(absSubDir, filter, recursively);
|
||||
});
|
||||
}
|
||||
|
||||
bool CDirectoryUtils::existsUnemptyDirectory(const QString &testDir)
|
||||
|
||||
@@ -217,11 +217,8 @@ namespace swift::misc
|
||||
int d2 = 0;
|
||||
dirs1Cleaned.sort(cs);
|
||||
dirs2Cleaned.sort(cs);
|
||||
for (const QString &d1 : dirs1)
|
||||
{
|
||||
if (!stringCompare(d1, dirs2.at(d2), cs)) { return false; }
|
||||
}
|
||||
return true;
|
||||
return std::all_of(dirs1.cbegin(), dirs1.cend(),
|
||||
[&](const QString &d1) { return stringCompare(d1, dirs2.at(d2), cs); });
|
||||
}
|
||||
|
||||
Qt::CaseSensitivity CFileUtils::osFileNameCaseSensitivity()
|
||||
@@ -258,11 +255,8 @@ namespace swift::misc
|
||||
Qt::CaseSensitivity cs)
|
||||
{
|
||||
if (excludeDirectories.isEmpty()) { return false; }
|
||||
for (const QString &ex : excludeDirectories)
|
||||
{
|
||||
if (matchesExcludeDirectory(directoryPath, ex, cs)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(excludeDirectories.cbegin(), excludeDirectories.cend(),
|
||||
[&](const QString &ex) { return matchesExcludeDirectory(directoryPath, ex, cs); });
|
||||
}
|
||||
|
||||
QStringList CFileUtils::removeSubDirectories(const QStringList &directories, Qt::CaseSensitivity cs)
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace swift::misc::network
|
||||
|
||||
bool CRoleList::hasAnyRole(const QStringList &roles) const
|
||||
{
|
||||
for (const QString &r : roles)
|
||||
{
|
||||
if (this->hasRole(r)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(roles.cbegin(), roles.cend(), [&](const QString &r) { return this->hasRole(r); });
|
||||
}
|
||||
|
||||
CRoleList::CRoleList(const CSequence<CRole> &other) : CSequence<CRole>(other) {}
|
||||
|
||||
@@ -11,11 +11,7 @@ namespace swift::misc::network
|
||||
|
||||
bool CServerList::containsName(const QString &name) const
|
||||
{
|
||||
for (const CServer &s : *this)
|
||||
{
|
||||
if (s.matchesName(name)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CServer &s) { return s.matchesName(name); });
|
||||
}
|
||||
|
||||
bool CServerList::removeByName(const QString &name)
|
||||
@@ -39,11 +35,7 @@ namespace swift::misc::network
|
||||
|
||||
bool CServerList::containsAddressPort(const CServer &server)
|
||||
{
|
||||
for (const CServer &s : *this)
|
||||
{
|
||||
if (s.matchesAddressPort(server)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CServer &s) { return s.matchesAddressPort(server); });
|
||||
}
|
||||
|
||||
void CServerList::addIfAddressNotExists(const CServer &server)
|
||||
|
||||
@@ -40,11 +40,8 @@ namespace swift::misc
|
||||
//! All order values set or missing some?
|
||||
bool needsOrder() const
|
||||
{
|
||||
for (const OBJ &obj : container())
|
||||
{
|
||||
if (!obj.hasValidOrder()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(this->container().begin(), this->container().end(),
|
||||
[](const OBJ &obj) { return !obj.hasValidOrder(); });
|
||||
}
|
||||
|
||||
//! All order values IOrderable::order
|
||||
|
||||
@@ -443,11 +443,9 @@ namespace swift::misc::physical_quantities
|
||||
static bool isValidUnitSymbol(const QString &symbol, Qt::CaseSensitivity caseSensitivity)
|
||||
{
|
||||
if (symbol.isEmpty()) return false;
|
||||
for (const auto &unit : U::allUnits())
|
||||
{
|
||||
if (stringCompare(unit.getSymbol(), symbol, caseSensitivity)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(U::allUnits().cbegin(), U::allUnits().cend(), [&](const auto &unit) {
|
||||
return stringCompare(unit.getSymbol(), symbol, caseSensitivity);
|
||||
});
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -477,11 +475,8 @@ namespace swift::misc::physical_quantities
|
||||
Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive)
|
||||
{
|
||||
if (candidate.isEmpty()) return false;
|
||||
for (const auto &unit : U::allUnits())
|
||||
{
|
||||
if (candidate.endsWith(unit.getSymbol(), caseSensitivity)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(U::allUnits().cbegin(), U::allUnits().cend(),
|
||||
[&](const auto &unit) { return candidate.endsWith(unit.getSymbol(), caseSensitivity); });
|
||||
}
|
||||
|
||||
//! Dimensionless unit
|
||||
|
||||
@@ -40,22 +40,18 @@ namespace swift::misc::simulation
|
||||
|
||||
bool CAircraftModelList::containsModelString(const QString &modelString, Qt::CaseSensitivity sensitivity) const
|
||||
{
|
||||
for (const CAircraftModel &model : (*this))
|
||||
{
|
||||
if (model.matchesModelString(modelString, sensitivity)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CAircraftModel &model) {
|
||||
return model.matchesModelString(modelString, sensitivity);
|
||||
});
|
||||
}
|
||||
|
||||
bool CAircraftModelList::containsModelStringOrDbKey(const CAircraftModel &model,
|
||||
Qt::CaseSensitivity sensitivity) const
|
||||
{
|
||||
for (const CAircraftModel &m : (*this))
|
||||
{
|
||||
if (m.hasValidDbKey() && m.getDbKey() == model.getDbKey()) { return true; }
|
||||
if (m.matchesModelString(model.getModelString(), sensitivity)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CAircraftModel &m) {
|
||||
return (m.hasValidDbKey() && m.getDbKey() == model.getDbKey()) ||
|
||||
m.matchesModelString(model.getModelString(), sensitivity);
|
||||
});
|
||||
}
|
||||
|
||||
bool CAircraftModelList::containsCallsign(const CCallsign &callsign) const
|
||||
|
||||
@@ -72,11 +72,8 @@ namespace swift::misc::simulation
|
||||
|
||||
bool CDistributorList::matchesAnyKeyOrAlias(const QString &keyOrAlias) const
|
||||
{
|
||||
for (const CDistributor &distributor : (*this))
|
||||
{
|
||||
if (distributor.matchesKeyOrAlias(keyOrAlias)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(),
|
||||
[&](const CDistributor &distributor) { return distributor.matchesKeyOrAlias(keyOrAlias); });
|
||||
}
|
||||
|
||||
QStringList CDistributorList::getDbKeysAndAliases(bool sort) const
|
||||
|
||||
@@ -66,11 +66,9 @@ namespace swift::misc::simulation::fscommon
|
||||
bool CAircraftCfgEntriesList::containsTitle(const QString &title) const
|
||||
{
|
||||
if (title.isEmpty()) { return false; }
|
||||
for (const CAircraftCfgEntries &entries : (*this))
|
||||
{
|
||||
if (stringCompare(entries.getTitle(), title, Qt::CaseInsensitive)) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(cbegin(), cend(), [&](const CAircraftCfgEntries &entries) {
|
||||
return stringCompare(entries.getTitle(), title, Qt::CaseInsensitive);
|
||||
});
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftCfgEntriesList::toAircraftModelList(bool ignoreDuplicatesAndEmptyModelStrings,
|
||||
|
||||
@@ -178,11 +178,9 @@ namespace swift::misc::simulation
|
||||
{
|
||||
const SetupsPerCallsign setupsCopy = this->getSetupsPerCallsign();
|
||||
if (setupsCopy.isEmpty()) { return false; }
|
||||
for (const CInterpolationAndRenderingSetupPerCallsign &setup : setupsCopy)
|
||||
{
|
||||
if (setup.logInterpolation()) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(
|
||||
setupsCopy.cbegin(), setupsCopy.cend(),
|
||||
[](const CInterpolationAndRenderingSetupPerCallsign &setup) { return setup.logInterpolation(); });
|
||||
}
|
||||
|
||||
IInterpolationSetupProvider::SetupsPerCallsign IInterpolationSetupProvider::getSetupsPerCallsign() const
|
||||
|
||||
@@ -458,21 +458,15 @@ namespace swift::misc
|
||||
//! Any negative or zero offset time?
|
||||
bool containsZeroOrNegativeOffsetTime() const
|
||||
{
|
||||
for (const ITimestampWithOffsetBased &obj : this->container())
|
||||
{
|
||||
if (obj.getTimeOffsetMs() <= 0) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(this->container().begin(), this->container().end(),
|
||||
[](const ITimestampWithOffsetBased &obj) { return obj.getTimeOffsetMs() <= 0; });
|
||||
}
|
||||
|
||||
//! Any negative offset time?
|
||||
bool containsNegativeOffsetTime() const
|
||||
{
|
||||
for (const ITimestampWithOffsetBased &obj : this->container())
|
||||
{
|
||||
if (obj.getTimeOffsetMs() < 0) { return true; }
|
||||
}
|
||||
return false;
|
||||
return std::any_of(this->container().begin(), this->container().end(),
|
||||
[](const ITimestampWithOffsetBased &obj) { return obj.getTimeOffsetMs() < 0; });
|
||||
}
|
||||
|
||||
//! Adds a time to all offset values
|
||||
|
||||
Reference in New Issue
Block a user