]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity 24334, 24335
authorrgrosso <Raffaele.Grosso@cern.ch>
Thu, 8 Jan 2015 15:53:12 +0000 (16:53 +0100)
committerrgrosso <Raffaele.Grosso@cern.ch>
Thu, 8 Jan 2015 15:54:49 +0000 (16:54 +0100)
There was no point in using an unsigned integer as counter, as far as I
can see.

STEER/CDB/AliBaseCalibViewer.cxx

index c8e80d319f6711af5a3263bd7774da2f3e55d5be..bc2180b9fe4f1426e8a30f5e768894d80ebab376 100644 (file)
@@ -301,11 +301,11 @@ Double_t AliBaseCalibViewer::GetLTM(Int_t n, Double_t *array, Double_t *sigma, D
   Double_t *ddata = new Double_t[n];
   Double_t mean = 0, lsigma = 0;
   UInt_t nPoints = 0;
-  for (UInt_t i = 0; i < (UInt_t)n; i++) {
+  for (Int_t i = 0; i < n; i++) {
     ddata[nPoints]= array[nPoints];
     nPoints++;
   }
-  Int_t hh = TMath::Min(TMath::Nint(fraction * nPoints), Int_t(n));
+  Int_t hh = TMath::Min(TMath::Nint(fraction * nPoints), n);
   AliMathBase::EvaluateUni(nPoints, ddata, mean, lsigma, hh);
   if (sigma) *sigma = lsigma;
   delete [] ddata;