diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-12-01 21:54:10 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-12-02 11:01:32 +0000 |
commit | 3add520ef612716df5dc5c896041c1c70e52015f (patch) | |
tree | e86a973374caa940099f14766db8459b25ecfbaf /src/lib/corelib/buildgraph | |
parent | 712964ef2485a2fc66a791209cb8ab5e3f4ca0d0 (diff) |
Replace missing std::any_of with Internal::any_of
Change-Id: Ic17ce136f1438dbdc4cf1d5c88947d004748fd70
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph')
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraphloader.cpp | 4 | ||||
-rw-r--r-- | src/lib/corelib/buildgraph/environmentscriptrunner.cpp | 6 | ||||
-rw-r--r-- | src/lib/corelib/buildgraph/executor.cpp | 9 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp index 145bca293..3e5dab2ee 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.cpp +++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp @@ -602,9 +602,7 @@ bool BuildGraphLoader::hasProductFileChanged(const std::vector<ResolvedProductPt for (const GroupPtr &group : product->groups) { if (!group->wildcards) continue; - const bool reExpansionRequired = std::any_of( - group->wildcards->dirTimeStamps.cbegin(), - group->wildcards->dirTimeStamps.cend(), + const bool reExpansionRequired = Internal::any_of(group->wildcards->dirTimeStamps, [](const std::pair<QString, FileTime> &pair) { return FileInfo(pair.first).lastModified() > pair.second; }); diff --git a/src/lib/corelib/buildgraph/environmentscriptrunner.cpp b/src/lib/corelib/buildgraph/environmentscriptrunner.cpp index 9dafbf296..841f39a8d 100644 --- a/src/lib/corelib/buildgraph/environmentscriptrunner.cpp +++ b/src/lib/corelib/buildgraph/environmentscriptrunner.cpp @@ -45,9 +45,10 @@ #include <language/propertymapinternal.h> #include <language/resolvedfilecontext.h> #include <language/scriptengine.h> +#include <logging/translator.h> #include <tools/qbsassert.h> #include <tools/qttools.h> -#include <logging/translator.h> +#include <tools/stlutils.h> #include <tools/stringconstants.h> #include <QtCore/qhash.h> @@ -123,8 +124,7 @@ void EnvironmentScriptRunner::setupEnvironment() const auto hasScript = [this](const ResolvedModuleConstPtr &m) { return !getScript(m.get()).sourceCode().isEmpty(); }; - const bool hasAnyScripts = std::any_of(m_product->modules.cbegin(), m_product->modules.cend(), - hasScript); + const bool hasAnyScripts = Internal::any_of(m_product->modules, hasScript); if (!hasAnyScripts) return; diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp index fe2815aa7..4c3cf7001 100644 --- a/src/lib/corelib/buildgraph/executor.cpp +++ b/src/lib/corelib/buildgraph/executor.cpp @@ -67,6 +67,7 @@ #include <tools/qbsassert.h> #include <tools/qttools.h> #include <tools/settings.h> +#include <tools/stlutils.h> #include <tools/stringconstants.h> #include <QtCore/qdir.h> @@ -661,8 +662,8 @@ bool Executor::transformerHasMatchingOutputTags(const TransformerConstPtr &trans if (m_activeFileTags.empty()) return true; // No filtering requested. - return std::any_of(transformer->outputs.cbegin(), transformer->outputs.cend(), - [this](const Artifact *a) { return artifactHasMatchingOutputTags(a); }); + return Internal::any_of(transformer->outputs, [this](const Artifact *a) { + return artifactHasMatchingOutputTags(a); }); } bool Executor::artifactHasMatchingOutputTags(const Artifact *artifact) const @@ -1230,8 +1231,8 @@ void Executor::syncFileDependencies() if (!product->buildData) continue; const auto artifactList = filterByType<Artifact>(product->buildData->allNodes()); - isReferencedByArtifact = std::any_of(artifactList.begin(), artifactList.end(), - [dep](const Artifact *a) { return a->fileDependencies.contains(dep); }); + isReferencedByArtifact = Internal::any_of(artifactList, [dep](const Artifact *a) { + return a->fileDependencies.contains(dep); }); // TODO: Would it be safe to mark the artifact as "not up to date" here and clear // its list of file dependencies, rather than doing the check again in // isUpToDate()? |