POLYGON_BOOLEAN_ROUTINE: init some variables

These should be inited later on, but it's clearer to
make it explicit.
This commit is contained in:
John Beard
2024-09-25 22:13:18 +01:00
parent 109675f39e
commit 79bb095a29
2 changed files with 6 additions and 2 deletions
@@ -528,6 +528,10 @@ void POLYGON_BOOLEAN_ROUTINE::Finalize()
// new PCB_SHAPEs for each outline
for( int i = 0; i < m_workingPolygons.OutlineCount(); ++i )
{
// If we handled any polygons to get any outline,
// there must be a layer set by now.
wxASSERT( m_layer >= 0 );
std::unique_ptr<PCB_SHAPE> new_poly_shape =
std::make_unique<PCB_SHAPE>( GetBoard(), SHAPE_T::POLY );
+2 -2
View File
@@ -358,8 +358,8 @@ private:
SHAPE_POLY_SET m_workingPolygons;
bool m_firstPolygon = true;
int m_width;
PCB_LAYER_ID m_layer;
int m_width = 0;
PCB_LAYER_ID m_layer = PCB_LAYER_ID::UNDEFINED_LAYER;
};
class POLYGON_MERGE_ROUTINE : public POLYGON_BOOLEAN_ROUTINE