Commit bcbde5d8 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.

In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
parent c7fe98db
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -525,18 +525,19 @@ bool ProcessExecute( const wxString& aCommandLine, int aFlags )
}


int GetTimeStamp()
unsigned long GetNewTimeStamp()
{
    static int OldTimeStamp, NewTimeStamp;
    static unsigned long oldTimeStamp;
    unsigned long newTimeStamp;

    NewTimeStamp = time( NULL );
    newTimeStamp = time( NULL );

    if( NewTimeStamp <= OldTimeStamp )
        NewTimeStamp = OldTimeStamp + 1;
    if( newTimeStamp <= oldTimeStamp )
        newTimeStamp = oldTimeStamp + 1;

    OldTimeStamp = NewTimeStamp;
    oldTimeStamp = newTimeStamp;

    return NewTimeStamp;
    return newTimeStamp;
}


+1 −1
Original line number Diff line number Diff line
@@ -554,7 +554,7 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
        // Clear annotation and init new time stamp for the new components:
        if( Struct->Type() == SCH_COMPONENT_T )
        {
            ( (SCH_COMPONENT*) Struct )->m_TimeStamp = GetTimeStamp();
            ( (SCH_COMPONENT*) Struct )->m_TimeStamp = GetNewTimeStamp();
            ( (SCH_COMPONENT*) Struct )->ClearAnnotation( NULL );
        }

+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
        wxPoint pos = GetScreen()->GetCrossHairPosition() -
                      ( (SCH_COMPONENT*) m_itemToRepeat )->GetPosition();
        m_itemToRepeat->SetFlags( IS_NEW );
        ( (SCH_COMPONENT*) m_itemToRepeat )->m_TimeStamp = GetTimeStamp();
        ( (SCH_COMPONENT*) m_itemToRepeat )->m_TimeStamp = GetNewTimeStamp();
        m_itemToRepeat->Move( pos );
        m_itemToRepeat->Draw( DrawPanel, DC, wxPoint( 0, 0 ), g_XorMode );
        MoveItem( m_itemToRepeat, DC );
+1 −1
Original line number Diff line number Diff line
@@ -673,7 +673,7 @@ bool CMP_LIBRARY::Save( OUTPUTFORMATTER& aFormatter )
{
    if( isModified )
    {
        timeStamp = GetTimeStamp();
        timeStamp = GetNewTimeStamp();
        isModified = false;
    }

+2 −2
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ int TestDuplicateSheetNames( bool aCreateMarker )
                    {
                        /* Create a new marker type ERC error*/
                        SCH_MARKER* marker = new SCH_MARKER();
                        marker->m_TimeStamp = GetTimeStamp();
                        marker->m_TimeStamp = GetNewTimeStamp();
                        marker->SetData( ERCE_DUPLICATE_SHEET_NAME,
                                         ( (SCH_SHEET*) test_item )->m_Pos,
                                         _( "Duplicate sheet name" ),
@@ -237,7 +237,7 @@ void Diagnose( NETLIST_OBJECT* aNetItemRef, NETLIST_OBJECT* aNetItemTst,

    /* Create new marker for ERC error. */
    marker = new SCH_MARKER();
    marker->m_TimeStamp = GetTimeStamp();
    marker->m_TimeStamp = GetNewTimeStamp();

    marker->SetMarkerType( MARK_ERC );
    marker->SetErrorLevel( WAR );
Loading