Skip to content

Commit aa8b935

Browse files
committed
Fix wrong warnings about bad flags assigned to good qualities
Due to the order of processing in WorstOfAllAggregator, we could get cases when a bad Flag (coming from Bad quality) would be assigned to Good quality, while the quality itself would be replaced just after. This commit reverses the order, which will silence the wrong warning.
1 parent 622afde commit aa8b935

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Framework/src/AggregatorRunner.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ AggregatorRunner::QualityObjectsWithAggregatorNameVector AggregatorRunner::aggre
174174
ILOG(Info, Devel) << "Processing aggregator: " << aggregatorName << ENDM;
175175

176176
if (mUpdatePolicyManager.isReady(aggregatorName)) {
177-
ILOG(Info, Devel) << " Quality Objects for the aggregator '" << aggregatorName << "' are ready, aggregating" << ENDM;
177+
ILOG(Info, Devel) << " Quality Objects for the aggregator '" << aggregatorName << "' are ready, aggregating" << ENDM;
178178
auto newQOs = aggregator->aggregate(mQualityObjects, *mActivity); // we give the whole list
179179
mTotalNumberObjectsProduced += newQOs.size();
180180
mTotalNumberAggregatorExecuted++;

Modules/Common/src/WorstOfAllAggregator.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ std::map<std::string, Quality> WorstOfAllAggregator::aggregate(QualityObjectsMap
4141
Quality current = Quality::Good;
4242
for (const auto& [qoName, qo] : qoMap) {
4343
(void)qoName;
44-
for (const auto& flag : qo->getFlags()) {
45-
current.addFlag(flag.first, flag.second);
46-
}
4744
if (qo->getQuality().isWorseThan(current)) {
4845
current.set(qo->getQuality());
4946
}
47+
for (const auto& flag : qo->getFlags()) {
48+
current.addFlag(flag.first, flag.second);
49+
}
5050
}
5151
ILOG(Info, Devel) << "Aggregated Quality: " << current << ENDM;
5252

0 commit comments

Comments
 (0)