Skip to content
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

Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962

Merged
merged 1 commit into from Aug 1, 2017
Merged

Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constant-out-of-range-compare] #19962

merged 1 commit into from Aug 1, 2017

Commits on Jul 28, 2017

  1. Calibration/EcalCalibAlgos: Fix clang warning [-Wtautological-constan…

    …t-out-of-range-compare]
    
    warning: comparison of constant 140 with expression of type 'reco::GsfElectron::Classification' is always true [-Wtautological-constant-out-of-range-compare]
    zeeCandidates[myBestZ].second->getRecoElectron()->classification()!= 140);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^  ~~~
    
    Store return value on ClassificationVariables::classification() in a temporary variable and then compare to the "magic numbers". This is obviously an unused algorithm because the conversion to the classification enum values was never made. I think this algorithm was implemented elsewhere in the code. This aviods the clang warning, but if this is unused code it should be removed.
    gartung committed Jul 28, 2017
    Copy the full SHA
    5b7af9a View commit details
    Browse the repository at this point in the history