X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSHuffman.cxx;h=71817bf1753a27b358548c619961758a06b9e2d3;hb=ca10471ab237f6c3a4ba69da0a8ff8c3d8b80d62;hp=644e67e8567799bf8c1f751694e1ee87a363439b;hpb=92c19c36512433d19719aec230f26127453b2815;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSHuffman.cxx b/ITS/AliITSHuffman.cxx index 644e67e8567..71817bf1753 100644 --- a/ITS/AliITSHuffman.cxx +++ b/ITS/AliITSHuffman.cxx @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include @@ -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; + } }