Variable tagLengthWord in the dicomStreamCodec::writeTag method can be localized

Issue #378 new
Paolo Brandoli repo owner created an issue

The scope of tagLengthWord in the dicomStreamCodec::writeTag method is too broad.

It should be declared as const only inside the block

    {
        if(bSequence)
        {
            DICOMHERO_THROW(InvalidSequenceItemError, "Sequences cannot be used with dataType " << dataTypeString);
        }
        pDestStream->adjustEndian((std::uint8_t*)&tagLengthWord, 2, endianType);
        pDestStream->write((std::uint8_t*)&tagLengthWord, 2);
    }

Comments (0)

  1. Log in to comment