]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/TTreeStream.cxx
Fixing CONSTANT_EXPRESSION_RESULT Coverity defect
[u/mrichter/AliRoot.git] / STEER / TTreeStream.cxx
index 6a9c992529e519dd22fa1c8f7705e1dcb2732df9..0e2013362015f315d4369e9cb1a99afa7277a81a 100644 (file)
@@ -325,7 +325,8 @@ Int_t TTreeStream::CheckIn(Char_t type, void *pointer)
   //
   // Insert object of given type
   //
-  if (!fElements) fElements = new TObjArray(1000);
+  if (!fElements) fElements = new TObjArray(10000);
+  if (fElements->GetSize()<=fCurrentIndex) fElements->Expand(fCurrentIndex*2);
   TTreeDataElement* element = (TTreeDataElement*)fElements->At(fCurrentIndex);
   if (!element) {
     element = new TTreeDataElement(type);