bool/int type safety

This commit is contained in:
Marek Roszko 2021-01-31 19:38:20 -05:00
parent 89d3b0b670
commit 9d0b16e814
5 changed files with 6 additions and 6 deletions

View File

@ -188,7 +188,7 @@ public:
return m_status & type;
}
void SetState( int type, int state )
void SetState( int type, bool state )
{
if( state )
m_status |= type; // state = ON or OFF

View File

@ -76,7 +76,7 @@ static PATH_STATUS uniquePathBetweenNodes( CN_ITEM* u, CN_ITEM* v, std::vector<C
std::deque<Path> Q;
Path pInit;
int pathFound = false;
bool pathFound = false;
pInit.push_back( u );
Q.push_back( pInit );

View File

@ -1174,7 +1174,7 @@ static int matchDpSuffix( const wxString& aNetName, wxString& aComplementNet,
}
int DRC_ENGINE::IsNetADiffPair( BOARD* aBoard, NETINFO_ITEM* aNet, int& aNetP, int& aNetN )
bool DRC_ENGINE::IsNetADiffPair( BOARD* aBoard, NETINFO_ITEM* aNet, int& aNetP, int& aNetN )
{
wxString refName = aNet->GetNetname();
wxString dummy, coupledNetName;

View File

@ -164,7 +164,7 @@ public:
DRC_TEST_PROVIDER* GetTestProvider( const wxString& name ) const;
static int IsNetADiffPair( BOARD* aBoard, NETINFO_ITEM* aNet, int& aNetP, int& aNetN );
static bool IsNetADiffPair( BOARD* aBoard, NETINFO_ITEM* aNet, int& aNetP, int& aNetN );
private:
void addRule( DRC_RULE* rule )

View File

@ -499,7 +499,7 @@ protected:
int m_partition[MAXNODES + 1];
int m_total;
int m_minFill;
int m_taken[MAXNODES + 1];
bool m_taken[MAXNODES + 1];
int m_count[2];
Rect m_cover[2];
ELEMTYPEREAL m_area[2];
@ -1333,7 +1333,7 @@ typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover( Node* a_node ) const
{
ASSERT( a_node );
int firstTime = true;
bool firstTime = true;
Rect rect;
InitRect( &rect );