]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSHuffman.cxx
Removing warnings with gcc4 (F.Carminati)
[u/mrichter/AliRoot.git] / ITS / AliITSHuffman.cxx
index 644e67e8567799bf8c1f751694e1ee87a363439b..71817bf1753a27b358548c619961758a06b9e2d3 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <TMath.h>
 #include <TObjArray.h>
-#include <iostream.h>
+#include <Riostream.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -36,7 +36,7 @@ AliITSHNode::AliITSHNode(UChar_t sym, ULong_t freq)
 }
 
 //__________________________________________________________________________
-AliITSHNode::AliITSHNode(const AliITSHNode &source){
+AliITSHNode::AliITSHNode(const AliITSHNode &source) : TObject(source){
   //     Copy Constructor 
   if(&source == this) return;
   this->fSymbol = source.fSymbol;
@@ -61,7 +61,7 @@ AliITSHNode&
 }
 
 //____________________________________________
-Int_t AliITSHNode::Compare(TObject *obj)
+Int_t AliITSHNode::Compare(const TObject *obj) const
 {
   // function called by Sort method of TObjArray
 
@@ -112,7 +112,7 @@ AliITSHTable::AliITSHTable(Int_t size)
 }
 
 //__________________________________________________________________________
-AliITSHTable::AliITSHTable(const AliITSHTable &source){
+AliITSHTable::AliITSHTable(const AliITSHTable &source) : TObject(source){
   //     Copy Constructor 
   if(&source == this) return;
   this->fSize = source.fSize;
@@ -142,7 +142,7 @@ AliITSHTable&
 void AliITSHTable::GetFrequencies(Int_t len, UChar_t *stream)
 {
   // get frequencies
-  printf("Get Frequencies: sym %p \n",fSym);
+  printf("Get Frequencies: sym %p \n",(void*)fSym);
 
   // use temporarily the fCode array to store the frequencies
   for (Int_t i=0; i< len; i++) {
@@ -191,7 +191,7 @@ void AliITSHTable::BuildHTable()
      fHNodes->RemoveAt(nindex-1);
      fHNodes->AddAt(aux,nindex-1);
      nindex--;
-     printf("nindex, obj at nindex %d %p \n",nindex,(AliITSHNode*)fHNodes->UncheckedAt(nindex));
+     printf("nindex, obj at nindex %d %p \n",nindex,(void*)fHNodes->UncheckedAt(nindex));
 
     }
 
@@ -216,7 +216,10 @@ AliITSHTable::~AliITSHTable()
     printf("HTable destructor !\n");
     if (fCodeLen) delete[] fCodeLen;
     if (fCode) delete [] fCode;
-    delete fHNodes;
+    if (fHNodes) {
+      fHNodes->Delete();
+      delete fHNodes;
+    }
 }