New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecoTracker/MeasurementDet : bug fix for gcc 6.0 misleading-indentation warning #15003
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,14 +80,16 @@ bool TkStripMeasurementDet::recHits(SimpleHitContainer & result, | |
SiStripClusterRef clusterref = detSet.makeRefTo( data.stripData().handle(), leftCluster); | ||
bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), tmp); | ||
if(!isCompatible) break; // exit loop on first incompatible hit | ||
for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); tmp.clear(); | ||
for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); | ||
tmp.clear(); | ||
} | ||
} | ||
for ( ; rightCluster != detSet.end(); rightCluster++) { | ||
SiStripClusterRef clusterref = detSet.makeRefTo( data.stripData().handle(), rightCluster); | ||
bool isCompatible = filteredRecHits(clusterref, cpepar, stateOnThisDet, est, data.stripClustersToSkip(), tmp); | ||
if(!isCompatible) break; // exit loop on first incompatible hit | ||
for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); tmp.clear(); | ||
for (auto && h: tmp) result.push_back(new SiStripRecHit2D(std::move(h))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
tmp.clear(); | ||
} | ||
|
||
return result.size()>oldSize; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,14 +20,15 @@ void StMeasurementConditionSet::set128StripStatus(int i, bool good, int idx) { | |
} else { | ||
bad128Strip_[offset+idx] = !good; | ||
if (good == false) { | ||
hasAny128StripBad_[i] = false; | ||
hasAny128StripBad_[i] = false; | ||
} else { // this should not happen, as usually you turn on all fibers | ||
// and then turn off the bad ones, and not vice-versa, | ||
// so I don't care if it's not optimized | ||
hasAny128StripBad_[i] = true; | ||
for (int j = 0; i < (totalStrips_[j] >> 7); j++) { | ||
if (bad128Strip_[j+offset] == false) hasAny128StripBad_[i] = false; break; | ||
} | ||
// and then turn off the bad ones, and not vice-versa, | ||
// so I don't care if it's not optimized | ||
hasAny128StripBad_[i] = true; | ||
for (int j = 0; i < (totalStrips_[j] >> 7); j++) { | ||
if (bad128Strip_[j+offset] == false) hasAny128StripBad_[i] = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add {} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want if (bad128Strip_[j+offset] == false) { hasAny128StripBad_[i] = false; } There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no
which makes sense There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
break; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't actually make sense, although matches what the previous version was doing. This code always stops after the first iteration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better fix the bug and not loose the warning that points to a problem. |
||
} | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok