7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-05 00:15:30 +00:00

Formatting.

This commit is contained in:
Jeff Young 2025-02-27 11:19:24 +00:00
parent a9cea9fbb7
commit 8e461941c0
6 changed files with 48 additions and 42 deletions

View File

@ -20,8 +20,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PNS_ITEM_H
#define __PNS_ITEM_H
#ifndef PNS_ITEM_H
#define PNS_ITEM_H
#include <memory>
#include <set>
@ -301,19 +301,19 @@ private:
COLLISION_SEARCH_CONTEXT* aCtx ) const;
protected:
PnsKind m_kind;
PnsKind m_kind;
BOARD_ITEM* m_parent;
PNS_LAYER_RANGE m_layers;
BOARD_ITEM* m_parent;
PNS_LAYER_RANGE m_layers;
bool m_movable;
NET_HANDLE m_net;
mutable int m_marker;
int m_rank;
bool m_routable;
bool m_isVirtual;
bool m_isFreePad;
bool m_isCompoundShapePrimitive;
bool m_movable;
NET_HANDLE m_net;
mutable int m_marker;
int m_rank;
bool m_routable;
bool m_isVirtual;
bool m_isFreePad;
bool m_isCompoundShapePrimitive;
};
template<typename T, typename S>
@ -333,4 +333,4 @@ std::unique_ptr< typename std::remove_const<T>::type > Clone( const T& aItem )
}
#endif // __PNS_ITEM_H
#endif // PNS_ITEM_H

View File

@ -35,11 +35,11 @@
namespace PNS {
LINE::LINE( const LINE& aOther )
: LINK_HOLDER( aOther ),
m_line( aOther.m_line ),
m_width( aOther.m_width ),
m_snapThreshhold( aOther.m_snapThreshhold )
LINE::LINE( const LINE& aOther ) :
LINK_HOLDER( aOther ),
m_line( aOther.m_line ),
m_width( aOther.m_width ),
m_snapThreshhold( aOther.m_snapThreshhold )
{
m_net = aOther.m_net;
m_movable = aOther.m_movable;

View File

@ -75,8 +75,10 @@ const VIA LINE_PLACER::makeVia( const VECTOR2I& aP )
// fixme: should belong to KICAD_IFACE
auto iface = Router()->GetInterface();
int start = m_sizes.ViaType() == VIATYPE::THROUGH ?iface->GetPNSLayerFromBoardLayer( F_Cu ) : m_sizes.GetLayerTop();
int end = m_sizes.ViaType() == VIATYPE::THROUGH ? iface->GetPNSLayerFromBoardLayer( B_Cu ) : m_sizes.GetLayerBottom();
int start = m_sizes.ViaType() == VIATYPE::THROUGH ? iface->GetPNSLayerFromBoardLayer( F_Cu )
: m_sizes.GetLayerTop();
int end = m_sizes.ViaType() == VIATYPE::THROUGH ? iface->GetPNSLayerFromBoardLayer( B_Cu )
: m_sizes.GetLayerBottom();
const PNS_LAYER_RANGE layers(
start ,
@ -553,8 +555,8 @@ bool LINE_PLACER::cursorDistMinimum( const SHAPE_LINE_CHAIN& aL, const VECTOR2I&
}
bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisionMask, PNS::PNS_MODE aMode,
bool& aViaOk )
bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisionMask,
PNS::PNS_MODE aMode, bool& aViaOk )
{
LINE walkFull( m_head );
LINE l1( m_head );

View File

@ -33,7 +33,8 @@ namespace PNS
class LINK_HOLDER : public ITEM
{
public:
LINK_HOLDER( PnsKind aKind ) : ITEM( aKind )
LINK_HOLDER( PnsKind aKind ) :
ITEM( aKind )
{}
///< Add a reference to an item registered in a #NODE that is a part of this line.
@ -71,6 +72,7 @@ public:
{
if( aIndex < 0 )
aIndex += m_links.size();
return m_links[aIndex];
}

View File

@ -19,8 +19,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PNS_SEGMENT_H
#define __PNS_SEGMENT_H
#ifndef PNS_SEGMENT_H
#define PNS_SEGMENT_H
#include <math/vector2d.h>
@ -108,7 +108,8 @@ public:
m_seg.SetSeg( SEG (tmp.B , tmp.A ) );
}
const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness, int aLayer = -1 ) const override;
const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness,
int aLayer = -1 ) const override;
virtual VECTOR2I Anchor( int n ) const override
{

View File

@ -222,6 +222,7 @@ LINE SHOVE::assembleLine( const LINKED_ITEM* aSeg, int* aIndex, bool aPreCleanup
if( aPreCleanup )
{
LINE cleaned;
if (preShoveCleanup( &cur, &cleaned ) )
return cleaned;
}
@ -955,21 +956,21 @@ NODE* SHOVE::reduceSpringback( const ITEM_SET& aHeadSet )
SPRINGBACK_TAG& spTag = m_nodeStack.back();
for( int i = 0; i < spTag.m_draggedVias.size(); i++ )
{
if (spTag.m_draggedVias[i].valid)
{
m_headLines[i].prevVia = m_headLines[i].theVia = spTag.m_draggedVias[i];
m_headLines[i].geometryModified = true;
PNS_DBG( Dbg(), Message,
wxString::Format( "restore-springback-via depth=%d %d %d %d %d ",
spTag.m_node->Depth(),
(int) m_nodeStack.size(),
m_headLines[i].theVia->pos.x,
m_headLines[i].theVia->pos.y,
m_headLines[i].theVia->layers.Start(),
m_headLines[i].theVia->layers.End() ) );
}
}
{
if (spTag.m_draggedVias[i].valid)
{
m_headLines[i].prevVia = m_headLines[i].theVia = spTag.m_draggedVias[i];
m_headLines[i].geometryModified = true;
PNS_DBG( Dbg(), Message,
wxString::Format( "restore-springback-via depth=%d %d %d %d %d ",
spTag.m_node->Depth(),
(int) m_nodeStack.size(),
m_headLines[i].theVia->pos.x,
m_headLines[i].theVia->pos.y,
m_headLines[i].theVia->layers.Start(),
m_headLines[i].theVia->layers.End() ) );
}
}
return m_nodeStack.back().m_node;
}