Redundant check in dicomCodec::allocChannels

Issue #138 closed
Paolo Brandoli repo owner created an issue

The following line code:

if(channelNum == 0)
    newChannel->m_samplingFactorX = samplingFactorX;

contains a redundant check. If channelNum is different than zero then samplingFactorX will be 1, and therefore can be safely assigned to the channel anyway (which already has samplingFactorX=1 by default).

Therefore the code could simply be:

newChannel->m_samplingFactorX = samplingFactorX;

Comments (4)

  1. Log in to comment