]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In RecoverResult(): replaced switch with if statements
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Dec 2007 16:39:21 +0000 (16:39 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Dec 2007 16:39:21 +0000 (16:39 +0000)
to avoid compilation error on SL4.

MUON/AliMUONTrackerDDLDecoder.h

index d7305f0397d6145cc3793ca27692880907df6b74..8ccf972792e1facab7782f6a51da0732b6f202ce 100644 (file)
@@ -915,9 +915,9 @@ AliMUONTrackerDDLDecoder<EventHandler>::TryRecoverStruct(
        const UInt_t* keyAtDataEnd = reinterpret_cast<const UInt_t*>(dataEnd);
        const UInt_t* keyAtStructEnd = reinterpret_cast<const UInt_t*>(structEnd);
        
-       switch (expectedKey)
-       {
-       case fgkBlockDataKey:
+
+        if ( expectedKey == fgkBlockDataKey )
+        {
                if (dataEnd == bufferEnd)
                {
                        // Are we at the end of the buffer?
@@ -949,10 +949,10 @@ AliMUONTrackerDDLDecoder<EventHandler>::TryRecoverStruct(
                                        totalLengthIsCorrect = true;
                        }
                }
+        }        
                        
-               break;
-       
-       case fgkDSPDataKey:
+        else if ( expectedKey == fgkDSPDataKey )
+        {
                if (dataEnd == bufferEnd)
                {
                        // Are we at the end of the buffer?
@@ -986,10 +986,9 @@ AliMUONTrackerDDLDecoder<EventHandler>::TryRecoverStruct(
                                        totalLengthIsCorrect = true;
                        }
                }
-                       
-               break;
-       
-       case fgkBusPatchDataKey:
+        }        
+        else if ( expectedKey == fgkBusPatchDataKey )
+        {
                if (dataEnd == bufferEnd)
                {
                        // Are we at the end of the buffer?
@@ -1023,13 +1022,7 @@ AliMUONTrackerDDLDecoder<EventHandler>::TryRecoverStruct(
                                        totalLengthIsCorrect = true;
                        }
                }
-                       
-               break;
-               
-       default:
-               // lengthIsCorrect and totalLengthIsCorrect already set to false.
-               break;
-       }
+        }
        
        if (headerKeyOk and lengthIsCorrect)
        {