// AliTRDdataArray destructor
//
- if (fIndex) delete fIndex;
+ if (fIndex) {
+ delete fIndex;
+ fIndex = 0;
+ }
}
// Does the boundary checking
//
- if ((idx2 >= fNdim2) || (idx2 < 0))
+ if ((idx2 >= fNdim2) ||
+ (idx2 < 0)) {
return OutOfBoundsError(idx1,idx2);
+ }
Int_t index = (*fIndex).At(idx2) + idx1;
- if ((index < 0) || (index > fNelems))
+ if ((index < 0) ||
+ (index > fNelems)) {
return OutOfBoundsError(idx1,idx2);
+ }
return kTRUE;
// Reset the array (old content gets deleted)
//
- if (fIndex) delete fIndex;
+ if (fIndex) {
+ delete fIndex;
+ }
+
fIndex = new AliTRDarrayI();
fIndex->Set(0);