Skip to content

Commit 68e8fa0

Browse files
committed
readability-implicit-bool-conversion
1 parent 7b6eb97 commit 68e8fa0

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ struct TableMakerMC {
393393
// loop over MC signals and add them to the signals array
394394
for (int isig = 0; isig < objArray->GetEntries(); ++isig) {
395395
MCSignal* sig = o2::aod::dqmcsignals::GetMCSignal(objArray->At(isig)->GetName());
396-
if (sig) {
396+
if (sig != nullptr) {
397397
fMCSignals.push_back(sig);
398398
}
399399
}
@@ -403,7 +403,7 @@ struct TableMakerMC {
403403
if (addMCSignalsStr != "") {
404404
std::vector<MCSignal*> addMCSignals = dqmcsignals::GetMCSignalsFromJSON(addMCSignalsStr.Data());
405405
for (auto& mcIt : addMCSignals) {
406-
if (mcIt) {
406+
if (mcIt != nullptr) {
407407
fMCSignals.push_back(mcIt);
408408
}
409409
}
@@ -625,7 +625,7 @@ struct TableMakerMC {
625625
VarManager::FillEvent<gkEventMcFillMapWithCent>(mcCollision);
626626
int j = 0;
627627
for (auto signal = fMCSignals.begin(); signal != fMCSignals.end(); signal++, j++) {
628-
if (mcflags & (static_cast<uint16_t>(1) << j)) {
628+
if ((mcflags & (static_cast<uint16_t>(1) << j)) != 0) {
629629
fHistMan->FillHistClass(Form("MCTruth_%s", (*signal)->GetName()), dqtablemakermc_helpers::varValues());
630630
}
631631
}
@@ -1691,7 +1691,7 @@ struct TableMakerMC {
16911691
void processOnlyBCs(soa::Join<aod::BCs, aod::BcSels>::iterator const& bc)
16921692
{
16931693
for (int i = 0; i < o2::aod::evsel::kNsel; i++) {
1694-
if (bc.alias_bit(i) > 0) {
1694+
if (static_cast<int>(bc.alias_bit(i)) > 0) {
16951695
(static_cast<TH2I*>(fStatsList->At(0)))->Fill(0.0, static_cast<float>(i));
16961696
}
16971697
}

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ struct TableMaker {
20432043
void processOnlyBCs(soa::Join<aod::BCs, aod::BcSels>::iterator const& bc)
20442044
{
20452045
for (int i = 0; i < o2::aod::evsel::kNsel; i++) {
2046-
if (bc.selection_bit(i) > 0) {
2046+
if (static_cast<int>(bc.selection_bit(i)) > 0) {
20472047
(static_cast<TH2D*>(fStatsList->At(kStatsEvent)))->Fill(0.0, static_cast<float>(i));
20482048
}
20492049
}

0 commit comments

Comments
 (0)