Variable tagLengthWord in the dicomStreamCodec::writeTag method can be localized
Issue #378
new
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);
}