diff --git a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h index 5f26a3dd4..3ed85b2a9 100644 --- a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h +++ b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h @@ -209,13 +209,9 @@ class GDCM_EXPORT DataSet // DUMB: this only search within the level of the current DataSet bool FindDataElement(const Tag &t) const { - const DataElement r(t); - //ConstIterator it = DES.find(r); - if( DES.find(r) != DES.end() ) - { - return true; - } - return false; + const auto it = GetDataElement(t); + // Return if tag is found + return it != GetDEEnd(); } // WARNING: