Skip to content

Commit e2258a4

Browse files
authored
BUG: Compute Twin Boundaries ASAN Cleanup (#1224)
remove precaching before validation
1 parent 0761360 commit e2258a4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/ComputeTwinBoundaries.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,9 @@ class CalculateTwinBoundaryWithIncoherenceImpl
179179

180180
const int32 feature1 = m_FaceLabels[2 * i];
181181
const int32 feature2 = m_FaceLabels[(2 * i) + 1];
182-
const int32 phase = m_FeaturePhases[feature1]; // Feature1 was arbitrarily selected the feature phase index is identical
183-
if(feature1 > 0 && feature2 > 0 && phase == m_FeaturePhases[feature2])
182+
if(feature1 > 0 && feature2 > 0 && m_FeaturePhases[feature1] == m_FeaturePhases[feature2])
184183
{
185-
const uint32 crystalStructure = m_CrystalStructures[phase];
184+
const uint32 crystalStructure = m_CrystalStructures[m_FeaturePhases[feature1]]; // Feature1 was arbitrarily selected the feature phase index is identical
186185
if(crystalStructure != EbsdLib::CrystalStructure::Cubic_High && crystalStructure != EbsdLib::CrystalStructure::Cubic_Low)
187186
{
188187
continue;
@@ -265,10 +264,9 @@ class CalculateTwinBoundaryImpl
265264

266265
const int32 feature1 = m_FaceLabels[2 * i];
267266
const int32 feature2 = m_FaceLabels[(2 * i) + 1];
268-
const int32 phase = m_FeaturePhases[feature1]; // Feature1 was arbitrarily selected the feature phase index is identical
269-
if(feature1 > 0 && feature2 > 0 && phase == m_FeaturePhases[feature2])
267+
if(feature1 > 0 && feature2 > 0 && m_FeaturePhases[feature1] == m_FeaturePhases[feature2])
270268
{
271-
const uint32 crystalStructure = m_CrystalStructures[phase];
269+
const uint32 crystalStructure = m_CrystalStructures[m_FeaturePhases[feature1]]; // Feature1 was arbitrarily selected the feature phase index is identical
272270
if(crystalStructure != EbsdLib::CrystalStructure::Cubic_High && crystalStructure != EbsdLib::CrystalStructure::Cubic_Low)
273271
{
274272
continue;

0 commit comments

Comments
 (0)