Skip to content

Commit c5f9ae5

Browse files
authored
[Common] Fix compilation warnings (#8379)
1 parent 549fa54 commit c5f9ae5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Common/Core/TPCVDriftManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class TPCVDriftManager
116116
if (dDriftErr < 0.f || dDrift > 250.f) { // we cannot move a track outside the drift volume
117117
if (mOutside < mWarningLimit) {
118118
LOGP(warn, "Skipping correction outside of tpc volume with dDrift={} +- {}", dDrift, dDriftErr);
119-
const auto& trackBC = trackExtra.template collision_as<Collisions>().template foundBC_as<BCs>().globalBC();
120-
const auto& colBC = col.template foundBC_as<BCs>().globalBC();
119+
const auto trackBC = trackExtra.template collision_as<Collisions>().template foundBC_as<BCs>().globalBC();
120+
const auto colBC = col.template foundBC_as<BCs>().globalBC();
121121
int diffBC = colBC - trackBC;
122122
LOGP(info, "ct={}; ctr={}; tTB={}; t0={}; dTime={}; dDrift={}; tgl={}: colBC={} trackBC={} diffBC={}", col.collisionTime(), col.collisionTimeRes(), tTB, trackExtra.trackTime(), dTime, dDrift, track.getTgl(), colBC, trackBC, diffBC);
123123
if (mOutside == mWarningLimit - 1) {

Common/TableProducer/Converters/bcFlagsCreator.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct bcFlagsCreator {
2222

2323
void process(aod::BCs const& bcTable)
2424
{
25-
for (auto& _ : bcTable) {
25+
for (int64_t i = 0; i < bcTable.size(); ++i) {
2626
bcFlags(0);
2727
}
2828
}

Common/TableProducer/mcCollsExtra.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
// Quick and dirty task to correlate MC <-> data
1313
//
1414

15-
#include <cmath>
1615
#include <array>
16+
#include <cmath>
1717
#include <cstdlib>
18+
#include <vector>
1819

1920
#include "Math/Vector4D.h"
2021
#include <TFile.h>
@@ -135,8 +136,8 @@ struct mcCollisionExtra {
135136
auto iter = std::find(sortedIndices.begin(), sortedIndices.end(), mcCollision.index());
136137
if (iter != sortedIndices.end()) {
137138
auto index = std::distance(iter, sortedIndices.begin());
138-
for (size_t iMcColl = index + 1; iMcColl < index + 17; iMcColl++) {
139-
if (iMcColl >= sortedIndices.size())
139+
for (auto iMcColl = index + 1; iMcColl < index + 17; iMcColl++) {
140+
if (iMcColl >= std::ssize(sortedIndices))
140141
continue;
141142
if (mcCollisionHasPoI[sortedIndices[iMcColl]])
142143
bitset(forwardHistory, iMcColl - index - 1);

0 commit comments

Comments
 (0)