]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
minor coverity defects: self-assignment protection
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Nov 2011 09:54:43 +0000 (09:54 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Nov 2011 09:54:43 +0000 (09:54 +0000)
HLT/BASE/AliHLTDataDeflaterSimple.h
HLT/BASE/AliHLTHuffman.cxx

index 7add76feecde308fe3df4eb39d999c8a05725f7d..6f15f2a34ce9770aafd60b0ddee59629d7a8ebc8 100644 (file)
@@ -60,6 +60,7 @@ public:
       , fValueCount(0), fBitCount(0) {}
 
     AliHLTDataDeflaterParameter& operator=(const AliHLTDataDeflaterParameter& src) {
+      if (this==&src) return *this;
       fName=src.fName; fFullBitLength=src.fFullBitLength; fReducedBitLength=src.fReducedBitLength;
       fMax=src.fMax; fMaxReduced=src.fMaxReduced;
       fMask=src.fMask; fMaskReduced=src.fMaskReduced;
index 1a9dc5a8486ba5646b8b411b2fe8a6c40d7cd660..1b689f86499b5d919eed79cdbcd3131aef80a298 100644 (file)
@@ -44,6 +44,7 @@ AliHLTHuffmanNode::AliHLTHuffmanNode(const AliHLTHuffmanNode& other)
 
 AliHLTHuffmanNode& AliHLTHuffmanNode::operator =(const AliHLTHuffmanNode& other) {
         /// assignment operator
+        if (this==&other) return *this;
        this->fValue = other.fValue;
        this->fWeight = other.fWeight;
        return *this;
@@ -369,6 +370,7 @@ void AliHLTHuffman::Print(Option_t* option) const {
 }
 
 AliHLTHuffman& AliHLTHuffman::operator =(const AliHLTHuffman& other) {
+        if (this==&other) return *this;
        fMaxValue = other.fMaxValue;
        fNodes = other.fNodes;
        fHuffTopNode = NULL;