Skip to content

Commit

Permalink
Merge pull request #40608 from mmusich/silenceSA_DataFormatsPatCandid…
Browse files Browse the repository at this point in the history
…ates

silence static analyzer warning about `std::isnan / std::isinf` in `PackedCandidate`
  • Loading branch information
cmsbuild authored Jan 30, 2023
2 parents 47002d5 + 2ce0ce7 commit 2beabc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DataFormats/PatCandidates/src/PackedCandidate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"

#include "DataFormats/Math/interface/liblogintpack.h"
#include "FWCore/Utilities/interface/isFinite.h"

#include "TMatrixDSym.h"
#include "TVectorD.h"
Expand Down Expand Up @@ -182,7 +183,7 @@ const reco::Track pat::PackedCandidate::pseudoPosDefTrack() const {
TMatrixDSym eigenCov(5);
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (std::isnan((m)(i, j)) || std::isinf((m)(i, j)))
if (edm::isNotFinite((m)(i, j)))
eigenCov(i, j) = 1e-6;
else
eigenCov(i, j) = (m)(i, j);
Expand Down

0 comments on commit 2beabc0

Please sign in to comment.