summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/rulesapplicator.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-07-22 18:03:05 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-07-23 12:08:51 +0200
commit5b666c9e530ac977c879ee4ea0d59046440b3bd9 (patch)
treea0683fca3b84097aa77057c8421f33bc9ac3bb45 /src/lib/buildgraph/rulesapplicator.cpp
parent5c96e5eda1b94aed18d67ee11b9d05d77bfe9b76 (diff)
downloadqbs-5b666c9e530ac977c879ee4ea0d59046440b3bd9.tar.gz
introduce FileTags::matches
This is faster and easier to use than the !FileTags::intersect(...).isEmpty() pattern. Change-Id: I40e27704704df92544748a5d531be3542f91ce87 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph/rulesapplicator.cpp')
-rw-r--r--src/lib/buildgraph/rulesapplicator.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/buildgraph/rulesapplicator.cpp b/src/lib/buildgraph/rulesapplicator.cpp
index 388da361a..34fdae728 100644
--- a/src/lib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/buildgraph/rulesapplicator.cpp
@@ -111,9 +111,7 @@ void RulesApplicator::doApply(const ArtifactList &inputArtifacts)
foreach (Artifact *targetArtifact, dep->buildData->targetArtifacts)
artifactsToCheck.unite(targetArtifact->transformer->outputs);
foreach (Artifact *artifact, artifactsToCheck) {
- FileTags matchingFileTags = artifact->fileTags;
- matchingFileTags.intersect(usingsFileTags);
- if (!matchingFileTags.isEmpty())
+ if (artifact->fileTags.matches(usingsFileTags))
usingArtifacts.insert(artifact);
}
}
@@ -279,8 +277,7 @@ Artifact *RulesApplicator::createOutputArtifact(const RuleArtifactConstPtr &rule
for (int i = 0; i < m_product->artifactProperties.count(); ++i) {
const ArtifactPropertiesConstPtr &props = m_product->artifactProperties.at(i);
- FileTags filter = props->fileTagsFilter();
- if (!filter.intersect(outputArtifact->fileTags).isEmpty()) {
+ if (outputArtifact->fileTags.matches(props->fileTagsFilter())) {
outputArtifact->properties = props->propertyMap();
break;
}