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?
totalLengthIsCorrect = true;
}
}
+ }
- break;
-
- case fgkDSPDataKey:
+ else if ( expectedKey == fgkDSPDataKey )
+ {
if (dataEnd == bufferEnd)
{
// Are we at the end of the buffer?
totalLengthIsCorrect = true;
}
}
-
- break;
-
- case fgkBusPatchDataKey:
+ }
+ else if ( expectedKey == fgkBusPatchDataKey )
+ {
if (dataEnd == bufferEnd)
{
// Are we at the end of the buffer?
totalLengthIsCorrect = true;
}
}
-
- break;
-
- default:
- // lengthIsCorrect and totalLengthIsCorrect already set to false.
- break;
- }
+ }
if (headerKeyOk and lengthIsCorrect)
{