Pcbnew: initialise ZONE_SETTINGS::m_ruleAreaPlacementSourceType

Fixes a text failure in qa_pcbnew.

If this is not initialised, at least the comparison operator will be
operating on junk member values if either side has not had the
source type set.

Maybe it doesn't even make sense for the source type/source to be
checked if m_isRuleArea is false (they're presumably "do not care" in
that context), but if they're initialised, it doesn't matter either
way.
This commit is contained in:
John Beard
2024-10-10 12:33:52 +08:00
parent a56da89bb8
commit bd86a74bcf
+5 -4
View File
@@ -76,6 +76,7 @@ ZONE_SETTINGS::ZONE_SETTINGS()
m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM;
SetIsRuleArea( false );
SetRuleAreaPlacementSourceType( RULE_AREA_PLACEMENT_SOURCE_TYPE::COMPONENT_CLASS );
SetDoNotAllowCopperPour( false );
SetDoNotAllowVias( true );
SetDoNotAllowTracks( true );
@@ -110,9 +111,9 @@ bool ZONE_SETTINGS::operator==( const ZONE_SETTINGS& aOther ) const
if( m_cornerSmoothingType != aOther.m_cornerSmoothingType ) return false;
if( m_cornerRadius != aOther.m_cornerRadius ) return false;
if( m_isRuleArea != aOther.m_isRuleArea ) return false;
if( m_ruleAreaType != aOther.m_ruleAreaType ) return false;
if( m_ruleAreaType != aOther.m_ruleAreaType ) return false;
if( m_ruleAreaPlacementSourceType != aOther.m_ruleAreaPlacementSourceType ) return false;
if( m_ruleAreaPlacementSource != aOther.m_ruleAreaPlacementSource ) return false;
if( m_ruleAreaPlacementSource != aOther.m_ruleAreaPlacementSource ) return false;
if( m_keepoutDoNotAllowCopperPour != aOther.m_keepoutDoNotAllowCopperPour ) return false;
if( m_keepoutDoNotAllowVias != aOther.m_keepoutDoNotAllowVias ) return false;
if( m_keepoutDoNotAllowTracks != aOther.m_keepoutDoNotAllowTracks ) return false;
@@ -156,9 +157,9 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE& aSource )
m_cornerSmoothingType = aSource.GetCornerSmoothingType();
m_cornerRadius = aSource.GetCornerRadius();
m_isRuleArea = aSource.GetIsRuleArea();
m_ruleAreaType = aSource.GetRuleAreaType();
m_ruleAreaType = aSource.GetRuleAreaType();
m_ruleAreaPlacementSourceType = aSource.GetRuleAreaPlacementSourceType();
m_ruleAreaPlacementSource = aSource.GetRuleAreaPlacementSource();
m_ruleAreaPlacementSource = aSource.GetRuleAreaPlacementSource();
m_keepoutDoNotAllowCopperPour = aSource.GetDoNotAllowCopperPour();
m_keepoutDoNotAllowVias = aSource.GetDoNotAllowVias();
m_keepoutDoNotAllowTracks = aSource.GetDoNotAllowTracks();