]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
memset only the necessary part of the sorted array
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Dec 2009 13:00:47 +0000 (13:00 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Dec 2009 13:00:47 +0000 (13:00 +0000)
TRD/AliTRDSignalIndex.cxx

index 6a7fc66f75f93b7fa476f034bf5f0ecd92221edc..b816e4b0579d34906629ec4c19969c2b203650bb 100644 (file)
@@ -213,6 +213,8 @@ void AliTRDSignalIndex::Allocate(const Int_t nrow, const Int_t ncol, const Int_t
   fBoolIndex = new Bool_t[fMaxLimit];
   fSortedIndex = new RowCol[fMaxLimit+1];
 
+  fCountRC = fMaxLimit+1;
+
   ResetArrays();
   ResetCounters();
 
@@ -224,7 +226,7 @@ void AliTRDSignalIndex::Allocate(const Int_t nrow, const Int_t ncol, const Int_t
 void AliTRDSignalIndex::ResetArrays()
 {
   memset(fBoolIndex,0x00,sizeof(Bool_t)*fMaxLimit);
-  memset(fSortedIndex,0xFF,sizeof(RowCol)*(fMaxLimit+1)); 
+  memset(fSortedIndex,0xFF,sizeof(RowCol)*fCountRC); 
   fSortedWasInit = kFALSE;
 }