Skip to content

Commit 0abc08b

Browse files
committed
Fix casts
Fixes C-style, redundant, wrong, and dangerous casts (found by Clang-Tidy and cpplint). - Remove redundant casts. (`readability-redundant-casting`) - Remove `const_cast`. (`cppcoreguidelines-pro-type-const-cast`) - Replace C-style casts with `static_cast`. (`google-readability-casting`, cpplint: `readability/casting`) - Replace unsafe C-style casts with `dynamic_cast`. (`cppcoreguidelines-pro-type-cstyle-cast`) - Replace `static_cast` in downcasts with `dynamic_cast`. (`cppcoreguidelines-pro-type-static-cast-downcast`) - Replace `reinterpret_cast` with `static_cast` or `dynamic_cast`. (`cppcoreguidelines-pro-type-reinterpret-cast`) - Replace two-step casting through `void*` with `reinterpret_cast`. (`bugprone-casting-through-void`)
1 parent 7900bb8 commit 0abc08b

25 files changed

Lines changed: 132 additions & 132 deletions

‎Common/Core/FFitWeights.cxx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ void FFitWeights::init()
8686
fW_data->Add(new TProfile("pMeanPt", "", centBin, 0, centBin));
8787
fW_data->Add(new TH2D("hPtWeight", "", centBin, 0, centBin, ptBin, ptAxis->GetXmin(), ptAxis->GetXmax()));
8888

89-
ptProfCent = reinterpret_cast<TProfile*>(fW_data->FindObject("pMeanPt"));
90-
h2ptCent = reinterpret_cast<TH2D*>(fW_data->FindObject("hPtWeight"));
89+
ptProfCent = dynamic_cast<TProfile*>(fW_data->FindObject("pMeanPt"));
90+
h2ptCent = dynamic_cast<TH2D*>(fW_data->FindObject("hPtWeight"));
9191
};
9292

9393
void FFitWeights::fillWeights(float centrality, float qn, int nh, const char* pf)
@@ -98,10 +98,10 @@ void FFitWeights::fillWeights(float centrality, float qn, int nh, const char* pf
9898
if (!tar)
9999
return;
100100

101-
TH2D* th2 = reinterpret_cast<TH2D*>(tar->FindObject(this->getQName(nh, pf)));
101+
TH2D* th2 = dynamic_cast<TH2D*>(tar->FindObject(this->getQName(nh, pf)));
102102
if (!th2) {
103103
tar->Add(new TH2D(this->getQName(nh, pf), this->getAxisName(nh, pf), centBin, 0, centBin, qAxis->GetNbins(), qAxis->GetXmin(), qAxis->GetXmax()));
104-
th2 = reinterpret_cast<TH2D*>(tar->At(tar->GetEntries() - 1));
104+
th2 = dynamic_cast<TH2D*>(tar->At(tar->GetEntries() - 1));
105105
}
106106
th2->Fill(centrality, qn);
107107
};
@@ -117,7 +117,7 @@ void FFitWeights::fillPt(float centrality, float pt, float weight, bool first)
117117
float FFitWeights::getPtMult(float centrality)
118118
{
119119
if (!ptProfCent) {
120-
ptProfCent = reinterpret_cast<TProfile*>(fW_data->FindObject("pMeanPt"));
120+
ptProfCent = dynamic_cast<TProfile*>(fW_data->FindObject("pMeanPt"));
121121
}
122122
return ptProfCent->GetBinContent(ptProfCent->FindBin(centrality));
123123
};
@@ -132,7 +132,7 @@ Long64_t FFitWeights::Merge(TCollection* collist)
132132
}
133133
FFitWeights* lW = 0;
134134
TIter allW(collist);
135-
while ((lW = (reinterpret_cast<FFitWeights*>(allW())))) {
135+
while ((lW = (dynamic_cast<FFitWeights*>(allW())))) {
136136
addArray(fW_data, lW->getDataArray());
137137
nmerged++;
138138
}
@@ -150,7 +150,7 @@ void FFitWeights::addArray(TObjArray* targ, TObjArray* sour)
150150

151151
auto* tObj = targ->FindObject(obj->GetName());
152152
if (!tObj) {
153-
auto* clone = static_cast<TObject*>(obj->Clone(obj->GetName()));
153+
auto* clone = obj->Clone(obj->GetName());
154154
if (auto* h = dynamic_cast<TH1*>(clone))
155155
h->SetDirectory(0);
156156
targ->Add(clone);
@@ -168,7 +168,7 @@ void FFitWeights::mptSel()
168168
if (!tar)
169169
return;
170170

171-
TH2D* th2 = reinterpret_cast<TH2D*>(tar->FindObject("hPtWeight"));
171+
TH2D* th2 = dynamic_cast<TH2D*>(tar->FindObject("hPtWeight"));
172172
if (!th2) {
173173
return;
174174
}
@@ -198,7 +198,7 @@ void FFitWeights::qSelection(const std::vector<int>& nhv, const std::vector<std:
198198

199199
for (const auto& pf : stv) {
200200
for (const auto& nh : nhv) {
201-
TH2D* th2{reinterpret_cast<TH2D*>(tar->FindObject(this->getQName(nh, pf.c_str())))};
201+
TH2D* th2{dynamic_cast<TH2D*>(tar->FindObject(this->getQName(nh, pf.c_str())))};
202202
if (!th2) {
203203
LOGF(info, "FFitWeights qh not found!");
204204
return;

‎Common/Core/PID/PIDTOFParamService.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ struct TOFSupport : o2::framework::ServicePlugin {
298298
},
299299
.configure = CommonServices::noConfiguration(),
300300
.exit = [](ServiceRegistryRef, void* service) {
301-
auto* resp = reinterpret_cast<o2::pid::tof::TOFResponse*>(service);
301+
auto* resp = static_cast<o2::pid::tof::TOFResponse*>(service);
302302
delete resp; },
303303
.kind = ServiceKind::Serial};
304304
}

‎Common/Core/Zorro.cxx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry,
7272
for (int iBin{2}; iBin < mSelections->GetNbinsX(); ++iBin) { // Exclude first and last bins as they are total number of analysed and selected events, respectively
7373
mAnalysedTriggers->GetXaxis()->SetBinLabel(iBin - 1, mSelections->GetXaxis()->GetBinLabel(iBin));
7474
}
75-
std::shared_ptr<TH1> selections = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "Selections").data(), "", o2::framework::HistType::kTH1D, {{mSelections->GetNbinsX(), -0.5, static_cast<double>(mSelections->GetNbinsX() - 0.5)}});
75+
std::shared_ptr<TH1> selections = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "Selections").data(), "", o2::framework::HistType::kTH1D, {{mSelections->GetNbinsX(), -0.5, (mSelections->GetNbinsX() - 0.5)}});
7676
selections->SetBit(TH1::kIsAverage);
7777
for (int iBin{1}; iBin <= mSelections->GetNbinsX(); ++iBin) {
7878
selections->GetXaxis()->SetBinLabel(iBin, mSelections->GetXaxis()->GetBinLabel(iBin));
@@ -81,7 +81,7 @@ void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry,
8181
}
8282
}
8383
if (mScalers) {
84-
std::shared_ptr<TH1> scalers = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "Scalers").data(), "", o2::framework::HistType::kTH1D, {{mScalers->GetNbinsX(), -0.5, static_cast<double>(mScalers->GetNbinsX() - 0.5)}});
84+
std::shared_ptr<TH1> scalers = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "Scalers").data(), "", o2::framework::HistType::kTH1D, {{mScalers->GetNbinsX(), -0.5, (mScalers->GetNbinsX() - 0.5)}});
8585
scalers->SetBit(TH1::kIsAverage);
8686
for (int iBin{1}; iBin <= mScalers->GetNbinsX(); ++iBin) {
8787
scalers->GetXaxis()->SetBinLabel(iBin, mScalers->GetXaxis()->GetBinLabel(iBin));
@@ -90,7 +90,7 @@ void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry,
9090
}
9191
}
9292
if (mInspectedTVX) {
93-
std::shared_ptr<TH1> inspectedTVX = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "InspectedTVX").data(), "", o2::framework::HistType::kTH1D, {{mInspectedTVX->GetNbinsX(), -0.5, static_cast<double>(mInspectedTVX->GetNbinsX() - 0.5)}});
93+
std::shared_ptr<TH1> inspectedTVX = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "InspectedTVX").data(), "", o2::framework::HistType::kTH1D, {{mInspectedTVX->GetNbinsX(), -0.5, (mInspectedTVX->GetNbinsX() - 0.5)}});
9494
inspectedTVX->SetBit(TH1::kIsAverage);
9595
for (int iBin{1}; iBin <= mInspectedTVX->GetNbinsX(); ++iBin) {
9696
inspectedTVX->GetXaxis()->SetBinLabel(iBin, mInspectedTVX->GetXaxis()->GetBinLabel(iBin));
@@ -99,7 +99,7 @@ void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry,
9999
}
100100
}
101101
if (mTOIs.size()) {
102-
mAnalysedTriggersOfInterest = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "AnalysedTriggersOfInterest").data(), "", o2::framework::HistType::kTH1D, {{static_cast<int>(mTOIs.size()), -0.5, static_cast<double>(mTOIs.size() - 0.5)}}).get();
102+
mAnalysedTriggersOfInterest = histRegistry.add<TH1>((folderName + "/" + std::to_string(runNumber) + "/" + "AnalysedTriggersOfInterest").data(), "", o2::framework::HistType::kTH1D, {{static_cast<int>(mTOIs.size()), -0.5, (mTOIs.size() - 0.5)}}).get();
103103
for (size_t i{0}; i < mTOIs.size(); ++i) {
104104
mAnalysedTriggersOfInterest->GetXaxis()->SetBinLabel(i + 1, mTOIs[i].data());
105105
}

‎Common/Core/ZorroSummary.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
void ZorroSummary::Copy(TObject& c) const
2222
{
23-
static_cast<ZorroSummary&>(c) = *this;
23+
dynamic_cast<ZorroSummary&>(c) = *this;
2424
}
2525

2626
Long64_t ZorroSummary::Merge(TCollection* list)

‎Common/Core/macros/testMetadataHelper.C‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
auto readMetadata(std::unique_ptr<TFile>& currentFile) -> std::vector<o2::framework::ConfigParamSpec>
4646
{
4747
// Get the metadata, if any
48-
auto m = (TMap*)currentFile->Get("metaData");
48+
auto m = dynamic_cast<TMap*>(currentFile->Get("metaData"));
4949
if (!m) {
5050
return {};
5151
}
@@ -59,7 +59,7 @@ auto readMetadata(std::unique_ptr<TFile>& currentFile) -> std::vector<o2::framew
5959
LOGP(info, "Metadata for file \"{}\":", currentFile->GetName());
6060
first = false;
6161
}
62-
auto objString = (TObjString*)m->GetValue(obj);
62+
auto objString = dynamic_cast<TObjString*>(m->GetValue(obj));
6363
std::string key = "aod-metadata-" + std::string(obj->GetName());
6464
LOGP(info, "- {}: {} goes into key {}", obj->GetName(), objString->String().Data(), key);
6565
char const* value = strdup(objString->String());

‎Common/TableProducer/PID/pidTOFBase.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ struct tofEventTime {
376376
tableFlags(0);
377377
tableEvTime(0.f, 999.f);
378378
if (enableTableTOFOnly) {
379-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
379+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
380380
}
381381
continue;
382382
}
@@ -408,7 +408,7 @@ struct tofEventTime {
408408
tableFlags(flags);
409409
tableEvTime(et, erret);
410410
if (enableTableTOFOnly) {
411-
tableEvTimeTOFOnly((uint8_t)filterForTOFEventTime(trk), et, erret, evTimeTOF.mEventTimeMultiplicity);
411+
tableEvTimeTOFOnly(static_cast<uint8_t>(filterForTOFEventTime(trk)), et, erret, evTimeTOF.mEventTimeMultiplicity);
412412
}
413413
}
414414
}
@@ -438,7 +438,7 @@ struct tofEventTime {
438438
tableFlags(0);
439439
tableEvTime(0.f, 999.f);
440440
if (enableTableTOFOnly) {
441-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
441+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
442442
}
443443
continue;
444444
}
@@ -504,7 +504,7 @@ struct tofEventTime {
504504
}
505505
tableEvTime(eventTime / sumOfWeights, std::sqrt(1. / sumOfWeights));
506506
if (enableTableTOFOnly) {
507-
tableEvTimeTOFOnly((uint8_t)filterForTOFEventTime(trk), t0TOF[0], t0TOF[1], evTimeTOF.mEventTimeMultiplicity);
507+
tableEvTimeTOFOnly(static_cast<uint8_t>(filterForTOFEventTime(trk)), t0TOF[0], t0TOF[1], evTimeTOF.mEventTimeMultiplicity);
508508
}
509509
}
510510
}
@@ -529,7 +529,7 @@ struct tofEventTime {
529529

530530
for (auto const& t : tracks) { // Loop on collisions
531531
if (enableTableTOFOnly) {
532-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
532+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
533533
}
534534
if (!t.has_collision() || collisions.size() == 0) { // Track was not assigned, cannot compute event time
535535
tableFlags(0);

‎Common/TableProducer/PID/pidTOFMerge.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ struct tofEventTime {
405405
tableFlags(0);
406406
tableEvTime(0.f, 999.f);
407407
if (enableTableEvTimeTOFOnly) {
408-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
408+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
409409
}
410410
continue;
411411
}
@@ -470,7 +470,7 @@ struct tofEventTime {
470470
}
471471
tableEvTime(eventTime / sumOfWeights, std::sqrt(1. / sumOfWeights));
472472
if (enableTableEvTimeTOFOnly) {
473-
tableEvTimeTOFOnly((uint8_t)filterForTOFEventTime(trk), t0TOF[0], t0TOF[1], evTimeMakerTOF.mEventTimeMultiplicity);
473+
tableEvTimeTOFOnly(static_cast<uint8_t>(filterForTOFEventTime(trk)), t0TOF[0], t0TOF[1], evTimeMakerTOF.mEventTimeMultiplicity);
474474
}
475475
}
476476
}
@@ -481,7 +481,7 @@ struct tofEventTime {
481481
tableFlags(0);
482482
tableEvTime(0.f, 999.f);
483483
if (enableTableEvTimeTOFOnly) {
484-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
484+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
485485
}
486486
continue;
487487
}
@@ -513,14 +513,14 @@ struct tofEventTime {
513513
tableFlags(flags);
514514
tableEvTime(et, erret);
515515
if (enableTableEvTimeTOFOnly) {
516-
tableEvTimeTOFOnly((uint8_t)filterForTOFEventTime(trk), et, erret, evTimeMakerTOF.mEventTimeMultiplicity);
516+
tableEvTimeTOFOnly(static_cast<uint8_t>(filterForTOFEventTime(trk)), et, erret, evTimeMakerTOF.mEventTimeMultiplicity);
517517
}
518518
}
519519
}
520520
} else if (mComputeEvTimeWithTOF == 0 && mComputeEvTimeWithFT0 == 1) {
521521
for (auto const& t : tracks) { // Loop on collisions
522522
if (enableTableEvTimeTOFOnly) {
523-
tableEvTimeTOFOnly((uint8_t)0, 0.f, 0.f, -1);
523+
tableEvTimeTOFOnly(static_cast<uint8_t>(0), 0.f, 0.f, -1);
524524
}
525525
if (!t.has_collision() || collisions.size() == 0) { // Track was not assigned, cannot compute event time
526526
tableFlags(0);

‎Common/TableProducer/PID/pidTPCBase.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct PidMultiplicity {
6161
}
6262

6363
using TrksIU = soa::Join<aod::TracksIU, aod::TracksExtra>;
64-
Partition<TrksIU> tracksWithTPCIU = (aod::track::tpcNClsFindable > (uint8_t)0);
64+
Partition<TrksIU> tracksWithTPCIU = (aod::track::tpcNClsFindable > static_cast<uint8_t>(0));
6565
void processIU(aod::Collision const& collision, TrksIU const&)
6666
{
6767
if (!enableTable) {
@@ -73,7 +73,7 @@ struct PidMultiplicity {
7373
PROCESS_SWITCH(PidMultiplicity, processIU, "Process with IU tracks, faster but works on Run3 only", false);
7474

7575
using Trks = soa::Join<aod::Tracks, aod::TracksExtra>;
76-
Partition<Trks> tracksWithTPC = (aod::track::tpcNClsFindable > (uint8_t)0);
76+
Partition<Trks> tracksWithTPC = (aod::track::tpcNClsFindable > static_cast<uint8_t>(0));
7777
void processStandard(aod::Collision const& collision, Trks const&)
7878
{
7979
if (!enableTable) {

‎Common/TableProducer/match-mft-ft0.cxx‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
147147

148148
int64_t minBCId = bcIt.globalIndex();
149149

150-
if ((int64_t)bcIt.globalBC() < firstBC + deltaBC) {
151-
while (bcIt != bcs.end() && (int64_t)bcIt.globalBC() < firstBC + deltaBC) {
150+
if (static_cast<int64_t>(bcIt.globalBC()) < firstBC + deltaBC) {
151+
while (bcIt != bcs.end() && static_cast<int64_t>(bcIt.globalBC()) < firstBC + deltaBC) {
152152
minBCId = bcIt.globalIndex();
153153

154154
++bcIt;
@@ -163,11 +163,11 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
163163
} else {
164164
// here bcIt.globalBC() >= firstBC + deltaBC
165165

166-
while (bcIt != bcs.begin() && (int64_t)bcIt.globalBC() >= (int64_t)firstBC + deltaBC) {
166+
while (bcIt != bcs.begin() && static_cast<int64_t>(bcIt.globalBC()) >= firstBC + deltaBC) {
167167
minBCId = bcIt.globalIndex();
168168
--bcIt;
169169
}
170-
if (bcIt == bcs.begin() && (int64_t)bcIt.globalBC() >= (int64_t)firstBC + deltaBC) {
170+
if (bcIt == bcs.begin() && static_cast<int64_t>(bcIt.globalBC()) >= firstBC + deltaBC) {
171171
minBCId = bcIt.globalIndex();
172172
}
173173
++bcIt; // retrieve the pointer which gave minBCId and minGlobalBC
@@ -178,12 +178,12 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
178178

179179
int64_t maxBCId = bcIt.globalIndex();
180180

181-
if ((int64_t)bcIt.globalBC() > (int64_t)lastBC + deltaBC) {
181+
if (static_cast<int64_t>(bcIt.globalBC()) > lastBC + deltaBC) {
182182
// the previous minimum is actually bigger than the right boundary
183183

184184
if (bcIt != bcs.begin()) {
185-
--bcIt; // let's check the previous element in the BC list
186-
if ((int64_t)bcIt.globalBC() < (int64_t)firstBC + deltaBC) // if this previous element is smaller than the left boundary
185+
--bcIt; // let's check the previous element in the BC list
186+
if (static_cast<int64_t>(bcIt.globalBC()) < firstBC + deltaBC) // if this previous element is smaller than the left boundary
187187
{
188188
// means that the slice of compatible BCs is empty
189189

@@ -192,18 +192,18 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
192192
}
193193
}
194194

195-
if ((int64_t)bcIt.globalBC() < (int64_t)firstBC + deltaBC) {
195+
if (static_cast<int64_t>(bcIt.globalBC()) < firstBC + deltaBC) {
196196
// the previous minimum is actually smaller than the right boundary
197197
++bcIt;
198198

199-
if (bcIt != bcs.end() && ((int64_t)bcIt.globalBC() > (int64_t)lastBC + deltaBC)) {
199+
if (bcIt != bcs.end() && (static_cast<int64_t>(bcIt.globalBC()) > lastBC + deltaBC)) {
200200
// check the following element
201201

202202
return bcs.emptySlice();
203203
}
204204
}
205205

206-
while (bcIt != bcs.end() && (int64_t)bcIt.globalBC() <= (int64_t)lastBC + deltaBC) {
206+
while (bcIt != bcs.end() && static_cast<int64_t>(bcIt.globalBC()) <= lastBC + deltaBC) {
207207
maxBCId = bcIt.globalIndex();
208208

209209
++bcIt;
@@ -275,7 +275,7 @@ struct matchmftft0 {
275275
o2::base::Propagator::initFieldFromGRP(grpmag); // for some reason this is necessary for the next next line
276276
runNumber = bc.runNumber();
277277

278-
o2::field::MagneticField* field = static_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField());
278+
o2::field::MagneticField* field = dynamic_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField());
279279

280280
Bz = field->getBz(centerMFT); // gives error if the propagator is not initFielded
281281
LOG(info) << "The field at the center of the MFT is Bz = " << Bz;

‎Common/TableProducer/match-mft-mch-data-mc.cxx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ struct match_mft_mch_data_mc {
643643
ccdbManager->get<TGeoManager>(geoPath);
644644
}
645645
o2::mch::TrackExtrap::setField();
646-
fieldB = static_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField());
646+
fieldB = dynamic_cast<o2::field::MagneticField*>(TGeoGlobalMagField::Instance()->GetField());
647647
}
648648

649649
void init(o2::framework::InitContext&)
@@ -703,7 +703,7 @@ struct match_mft_mch_data_mc {
703703

704704
tableMatchingParams(matching.getGMPtAtDCA(),
705705
matching.getGMEtaAtDCA(),
706-
static_cast<int16_t>(matching.getGMQ()),
706+
matching.getGMQ(),
707707
matching.getDpt(),
708708
matching.getDx(),
709709
matching.getDy(),
@@ -732,7 +732,7 @@ struct match_mft_mch_data_mc {
732732

733733
tableMixMatchingParams(matching.getGMPtAtDCA(),
734734
matching.getGMEtaAtDCA(),
735-
static_cast<int16_t>(matching.getGMQ()),
735+
matching.getGMQ(),
736736
matching.getDpt(),
737737
matching.getDx(),
738738
matching.getDy(),

0 commit comments

Comments
 (0)