Loading include/class_board_design_settings.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -105,7 +105,7 @@ public: * Function GetDefault * Function GetDefault * @return the default netclass. * @return the default netclass. */ */ inline NETCLASS* GetDefault() const inline NETCLASSPTR GetDefault() const { { return m_NetClasses.GetDefault(); return m_NetClasses.GetDefault(); } } Loading pcbnew/autorouter/routing_matrix.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -201,7 +201,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) LAYER_MSK layerMask; LAYER_MSK layerMask; // use the default NETCLASS? // use the default NETCLASS? NETCLASS* nc = aPcb->GetDesignSettings().GetDefault(); NETCLASSPTR nc = aPcb->GetDesignSettings().GetDefault(); int trackWidth = nc->GetTrackWidth(); int trackWidth = nc->GetTrackWidth(); int clearance = nc->GetClearance(); int clearance = nc->GetClearance(); Loading pcbnew/class_board.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -91,7 +91,7 @@ BOARD::BOARD() : m_Layer[layer].m_Type = LT_UNDEFINED; m_Layer[layer].m_Type = LT_UNDEFINED; } } NETCLASS* defaultClass = m_designSettings.GetDefault(); NETCLASSPTR defaultClass = m_designSettings.GetDefault(); defaultClass->SetDescription( _( "This is the default net class." ) ); defaultClass->SetDescription( _( "This is the default net class." ) ); // Initialize default values in default netclass. // Initialize default values in default netclass. Loading pcbnew/class_board_connected_item.cpp +6 −8 Original line number Original line Diff line number Diff line Loading @@ -89,7 +89,7 @@ const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const { { NETCLASS* myclass = GetNetClass(); NETCLASSPTR myclass = GetNetClass(); // DO NOT use wxASSERT, because GetClearance is called inside an OnPaint event // DO NOT use wxASSERT, because GetClearance is called inside an OnPaint event // and a call to wxASSERT can crash the application. // and a call to wxASSERT can crash the application. Loading @@ -116,7 +116,7 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } } NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const NETCLASSPTR BOARD_CONNECTED_ITEM::GetNetClass() const { { // It is important that this be implemented without any sequential searching. // It is important that this be implemented without any sequential searching. // Simple array lookups should be fine, performance-wise. // Simple array lookups should be fine, performance-wise. Loading @@ -128,10 +128,11 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( board == NULL ) // Should not occur if( board == NULL ) // Should not occur { { DBG(printf( "%s: NULL board,type %d", __func__, Type() );) DBG(printf( "%s: NULL board,type %d", __func__, Type() );) return NULL; return NETCLASSPTR(); } } NETCLASS* netclass = NULL; NETCLASSPTR netclass; NETINFO_ITEM* net = board->FindNet( GetNetCode() ); NETINFO_ITEM* net = board->FindNet( GetNetCode() ); if( net ) if( net ) Loading @@ -151,15 +152,12 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const wxString BOARD_CONNECTED_ITEM::GetNetClassName() const wxString BOARD_CONNECTED_ITEM::GetNetClassName() const { { wxString name; wxString name; NETCLASS* myclass = GetNetClass(); NETCLASSPTR myclass = GetNetClass(); if( myclass ) if( myclass ) name = myclass->GetName(); name = myclass->GetName(); else else { BOARD* board = GetBoard(); name = NETCLASS::Default; name = NETCLASS::Default; } return name; return name; } } pcbnew/class_board_connected_item.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -142,7 +142,7 @@ public: * Function GetNetClass * Function GetNetClass * returns the NETCLASS for this item. * returns the NETCLASS for this item. */ */ NETCLASS* GetNetClass() const; boost::shared_ptr<NETCLASS> GetNetClass() const; /** /** * Function GetNetClassName * Function GetNetClassName Loading Loading
include/class_board_design_settings.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -105,7 +105,7 @@ public: * Function GetDefault * Function GetDefault * @return the default netclass. * @return the default netclass. */ */ inline NETCLASS* GetDefault() const inline NETCLASSPTR GetDefault() const { { return m_NetClasses.GetDefault(); return m_NetClasses.GetDefault(); } } Loading
pcbnew/autorouter/routing_matrix.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -201,7 +201,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag ) LAYER_MSK layerMask; LAYER_MSK layerMask; // use the default NETCLASS? // use the default NETCLASS? NETCLASS* nc = aPcb->GetDesignSettings().GetDefault(); NETCLASSPTR nc = aPcb->GetDesignSettings().GetDefault(); int trackWidth = nc->GetTrackWidth(); int trackWidth = nc->GetTrackWidth(); int clearance = nc->GetClearance(); int clearance = nc->GetClearance(); Loading
pcbnew/class_board.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -91,7 +91,7 @@ BOARD::BOARD() : m_Layer[layer].m_Type = LT_UNDEFINED; m_Layer[layer].m_Type = LT_UNDEFINED; } } NETCLASS* defaultClass = m_designSettings.GetDefault(); NETCLASSPTR defaultClass = m_designSettings.GetDefault(); defaultClass->SetDescription( _( "This is the default net class." ) ); defaultClass->SetDescription( _( "This is the default net class." ) ); // Initialize default values in default netclass. // Initialize default values in default netclass. Loading
pcbnew/class_board_connected_item.cpp +6 −8 Original line number Original line Diff line number Diff line Loading @@ -89,7 +89,7 @@ const wxString& BOARD_CONNECTED_ITEM::GetShortNetname() const int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const { { NETCLASS* myclass = GetNetClass(); NETCLASSPTR myclass = GetNetClass(); // DO NOT use wxASSERT, because GetClearance is called inside an OnPaint event // DO NOT use wxASSERT, because GetClearance is called inside an OnPaint event // and a call to wxASSERT can crash the application. // and a call to wxASSERT can crash the application. Loading @@ -116,7 +116,7 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const } } NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const NETCLASSPTR BOARD_CONNECTED_ITEM::GetNetClass() const { { // It is important that this be implemented without any sequential searching. // It is important that this be implemented without any sequential searching. // Simple array lookups should be fine, performance-wise. // Simple array lookups should be fine, performance-wise. Loading @@ -128,10 +128,11 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const if( board == NULL ) // Should not occur if( board == NULL ) // Should not occur { { DBG(printf( "%s: NULL board,type %d", __func__, Type() );) DBG(printf( "%s: NULL board,type %d", __func__, Type() );) return NULL; return NETCLASSPTR(); } } NETCLASS* netclass = NULL; NETCLASSPTR netclass; NETINFO_ITEM* net = board->FindNet( GetNetCode() ); NETINFO_ITEM* net = board->FindNet( GetNetCode() ); if( net ) if( net ) Loading @@ -151,15 +152,12 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const wxString BOARD_CONNECTED_ITEM::GetNetClassName() const wxString BOARD_CONNECTED_ITEM::GetNetClassName() const { { wxString name; wxString name; NETCLASS* myclass = GetNetClass(); NETCLASSPTR myclass = GetNetClass(); if( myclass ) if( myclass ) name = myclass->GetName(); name = myclass->GetName(); else else { BOARD* board = GetBoard(); name = NETCLASS::Default; name = NETCLASS::Default; } return name; return name; } }
pcbnew/class_board_connected_item.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -142,7 +142,7 @@ public: * Function GetNetClass * Function GetNetClass * returns the NETCLASS for this item. * returns the NETCLASS for this item. */ */ NETCLASS* GetNetClass() const; boost::shared_ptr<NETCLASS> GetNetClass() const; /** /** * Function GetNetClassName * Function GetNetClassName Loading