Skip to content

Commit

Permalink
COMP: Fix for gcc13.2 compiler test failures
Browse files Browse the repository at this point in the history
Three tests fail in ITK for Release and RelWithDebInfo builds:
  itkGDCMLegacyMultiFrameTest (Failed)
  itkGDCMImageReadWriteTest_MultiFrameMRIZSpacing (Failed)
  itkGDCM_ComplianceTest_singlebit (Failed)

(Note: Debug builds do not fail)

Intial review of the code did not indicate a problem, but it
looks like perhaps an over-optimization that removes variables
and causes the incorrect behavior to occur.

The function "FindDataElement" had duplicate code from "GetDataElement"
so made "FindDataElement" use the "GetDataElement" working function.
  • Loading branch information
hjmjohnson committed May 2, 2024
1 parent 126e2ec commit a98ed44
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a98ed44

Please sign in to comment.