Commit e6c85158 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

switch to C++'s false and true from C's FALSE and TRUE

parent ec307ef6
Loading
Loading
Loading
Loading
+20 −20
Original line number Original line Diff line number Diff line
@@ -30,9 +30,9 @@
#include "wx/image.h"
#include "wx/image.h"
#include "macros.h"
#include "macros.h"


#define wxSVG_DEBUG FALSE
#define wxSVG_DEBUG false


// or TRUE to see the calls being executed
// or true to see the calls being executed
#define newline    wxString( wxT( "\n" ) )
#define newline    wxString( wxT( "\n" ) )
#define space      wxString( wxT( " " ) )
#define space      wxString( wxT( " " ) )
#define semicolon  wxString( wxT( ";" ) )
#define semicolon  wxString( wxT( ";" ) )
@@ -85,7 +85,7 @@ wxString wxBrushString( wxColour c, int style )
        break;
        break;


    default:
    default:
        wxASSERT_MSG( FALSE, wxT( "wxSVGFileDC::Requested Brush Style not available" ) );
        wxASSERT_MSG( false, wxT( "wxSVGFileDC::Requested Brush Style not available" ) );
    }
    }


    s = s + newline;
    s = s + newline;
@@ -103,8 +103,8 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
    m_width  = Width;
    m_width  = Width;
    m_height = Height;
    m_height = Height;


    m_clipping = FALSE;
    m_clipping = false;
    m_OK = TRUE;
    m_OK = true;


    m_mm_to_pix_x = dpi / 25.4;
    m_mm_to_pix_x = dpi / 25.4;
    m_mm_to_pix_y = dpi / 25.4;
    m_mm_to_pix_y = dpi / 25.4;
@@ -132,7 +132,7 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
    m_font  = *wxNORMAL_FONT;
    m_font  = *wxNORMAL_FONT;
    m_brush = *wxWHITE_BRUSH;
    m_brush = *wxWHITE_BRUSH;


    m_graphics_changed = TRUE;
    m_graphics_changed = true;


    ////////////////////code here
    ////////////////////code here


@@ -626,7 +626,7 @@ void wxSVGFileDC::SetBrush( const wxBrush& brush )
{
{
    m_brush = brush;
    m_brush = brush;


    m_graphics_changed = TRUE;
    m_graphics_changed = true;
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetBrush Call executed" ) );
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetBrush Call executed" ) );
}
}


@@ -637,7 +637,7 @@ void wxSVGFileDC::SetPen( const wxPen& pen )
    // dashes, stipple :  not implemented
    // dashes, stipple :  not implemented
    m_pen = pen;
    m_pen = pen;


    m_graphics_changed = TRUE;
    m_graphics_changed = true;
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetPen Call executed" ) );
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetPen Call executed" ) );
}
}


@@ -697,7 +697,7 @@ void wxSVGFileDC::NewGraphics()
        break;
        break;


    default:
    default:
        wxASSERT_MSG( FALSE,
        wxASSERT_MSG( false,
                      wxT( "wxSVGFileDC::SetPen Call called to set a Style which is not available" )
                      wxT( "wxSVGFileDC::SetPen Call called to set a Style which is not available" )
                      );
                      );
        sWarn = sWarn + wxT(
        sWarn = sWarn + wxT(
@@ -710,7 +710,7 @@ void wxSVGFileDC::NewGraphics()


    s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
    s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
    write( s );
    write( s );
    m_graphics_changed = FALSE;
    m_graphics_changed = false;
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::NewGraphics Call executed" ) );
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::NewGraphics Call executed" ) );
}
}


@@ -730,7 +730,7 @@ void wxSVGFileDC::ComputeScaleAndOrigin()
    m_scaleY  = m_logicalScaleY * m_userScaleY;
    m_scaleY  = m_logicalScaleY * m_userScaleY;
    m_OriginX = m_logicalOriginX * m_logicalScaleX + m_deviceOriginX;
    m_OriginX = m_logicalOriginX * m_logicalScaleX + m_deviceOriginX;
    m_OriginY = m_logicalOriginY * m_logicalScaleY + m_deviceOriginY;
    m_OriginY = m_logicalOriginY * m_logicalScaleY + m_deviceOriginY;
    m_graphics_changed = TRUE;
    m_graphics_changed = true;
}
}




@@ -771,8 +771,8 @@ void wxSVGFileDC::SetMapMode( int mode )
    /*  we don't do this mega optimisation
    /*  we don't do this mega optimisation
     *  if (mode != wxMM_TEXT)
     *  if (mode != wxMM_TEXT)
     *  {
     *  {
     *      m_needComputeScaleX = TRUE;
     *      m_needComputeScaleX = true;
     *      m_needComputeScaleY = TRUE;
     *      m_needComputeScaleY = true;
     *  }
     *  }
     */
     */
}
}
@@ -833,22 +833,22 @@ void wxSVGFileDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
// export a bitmap as a raster image in png
// export a bitmap as a raster image in png
bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
                          wxDC* source, wxCoord xsrc, wxCoord ysrc,
                          wxDC* source, wxCoord xsrc, wxCoord ysrc,
                          int logicalFunc /*= wxCOPY*/, bool useMask /*= FALSE*/,
                          int logicalFunc /*= wxCOPY*/, bool useMask /*= false*/,
                          wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/ )
                          wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/ )
{
{
    if( logicalFunc != wxCOPY )
    if( logicalFunc != wxCOPY )
    {
    {
        wxASSERT_MSG( FALSE,
        wxASSERT_MSG( false,
                      wxT( "wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible" )
                      wxT( "wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible" )
                      );
                      );
        return FALSE;
        return false;
    }
    }
    if( useMask != FALSE )
    if( useMask != false )
    {
    {
        wxASSERT_MSG( FALSE,
        wxASSERT_MSG( false,
                      wxT( "wxSVGFileDC::DoBlit Call requested False mask ; this is not possible" )
                      wxT( "wxSVGFileDC::DoBlit Call requested False mask ; this is not possible" )
                      );
                      );
        return FALSE;
        return false;
    }
    }
    wxBitmap   myBitmap( width, height );
    wxBitmap   myBitmap( width, height );
    wxMemoryDC memDC;
    wxMemoryDC memDC;
@@ -857,7 +857,7 @@ bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord h
    memDC.SelectObject( wxNullBitmap );
    memDC.SelectObject( wxNullBitmap );
    DoDrawBitmap( myBitmap, xdest, ydest );
    DoDrawBitmap( myBitmap, xdest, ydest );
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::DoBlit Call executed" ) );
    wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::DoBlit Call executed" ) );
    return FALSE;
    return false;
}
}




+1 −1
Original line number Original line Diff line number Diff line
@@ -249,7 +249,7 @@ void DIALOG_PAGES_SETTINGS::SavePageSettings( wxCommandEvent& event )
        // here we assume translators will keep original paper size spellings
        // here we assume translators will keep original paper size spellings
        if( !pageInfo.SetType( paperType ) )
        if( !pageInfo.SetType( paperType ) )
        {
        {
            wxASSERT_MSG( FALSE, wxT( "the translation for paper size must preserve original spellings" ) );
            wxASSERT_MSG( false, wxT( "the translation for paper size must preserve original spellings" ) );
        }
        }


        // set portrait _after_ setting size/type above
        // set portrait _after_ setting size/type above
+1 −1
Original line number Original line Diff line number Diff line
@@ -101,7 +101,7 @@ bool EDA_APP::OnInit()
    SetTopWindow( frame );
    SetTopWindow( frame );


    frame->LoadProjectFile( filename.GetFullPath() );
    frame->LoadProjectFile( filename.GetFullPath() );
    frame->Show( TRUE );
    frame->Show( true );
    frame->BuildFOOTPRINTS_LISTBOX();
    frame->BuildFOOTPRINTS_LISTBOX();


    if( filename.IsOk() && filename.FileExists() )
    if( filename.IsOk() && filename.FileExists() )
+3 −3
Original line number Original line Diff line number Diff line
@@ -48,13 +48,13 @@ public:
    ~FOOTPRINTS_LISTBOX();
    ~FOOTPRINTS_LISTBOX();


    int      GetCount();
    int      GetCount();
    void     SetSelection( unsigned index, bool State = TRUE );
    void     SetSelection( unsigned index, bool State = true );
    void     SetString( unsigned linecount, const wxString& text );
    void     SetString( unsigned linecount, const wxString& text );
    void     AppendLine( const wxString& text );
    void     AppendLine( const wxString& text );
    void     SetFootprintFullList( FOOTPRINT_LIST& list );
    void     SetFootprintFullList( FOOTPRINT_LIST& list );
    void     SetFootprintFilteredList( COMPONENT*      Component,
    void     SetFootprintFilteredList( COMPONENT*      Component,
                                       FOOTPRINT_LIST& list );
                                       FOOTPRINT_LIST& list );
    void     SetActiveFootprintList( bool FullList, bool Redraw = FALSE );
    void     SetActiveFootprintList( bool FullList, bool Redraw = false );


    wxString GetSelectedFootprint();
    wxString GetSelectedFootprint();
    wxString OnGetItemText( long item, long column ) const;
    wxString OnGetItemText( long item, long column ) const;
@@ -88,7 +88,7 @@ public:
    void     Clear();
    void     Clear();
    int      GetCount();
    int      GetCount();
    wxString OnGetItemText( long item, long column ) const;
    wxString OnGetItemText( long item, long column ) const;
    void     SetSelection( unsigned index, bool State = TRUE );
    void     SetSelection( unsigned index, bool State = true );
    void     SetString( unsigned linecount, const wxString& text );
    void     SetString( unsigned linecount, const wxString& text );
    void     AppendLine( const wxString& text );
    void     AppendLine( const wxString& text );


+4 −4
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonUpClick( wxCommandEvent& event )
        list->SetSelection( jj-1 );
        list->SetSelection( jj-1 );
    }
    }


    m_LibListChanged = TRUE;
    m_LibListChanged = true;
}
}




@@ -229,7 +229,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonDownClick( wxCommandEvent& event )
        list->SetSelection(jj+1);
        list->SetSelection(jj+1);
    }
    }


    m_LibListChanged = TRUE;
    m_LibListChanged = true;
}
}




@@ -250,7 +250,7 @@ void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
    for( int ii = selections.GetCount()-1; ii >= 0; ii-- )
    for( int ii = selections.GetCount()-1; ii >= 0; ii-- )
    {
    {
        list->Delete(selections[ii] );
        list->Delete(selections[ii] );
        m_LibListChanged = TRUE;
        m_LibListChanged = true;
    }
    }
}
}


@@ -330,7 +330,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
        // Add or insert new library name, if not already in list
        // Add or insert new library name, if not already in list
        if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
        if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
        {
        {
            m_LibListChanged = TRUE;
            m_LibListChanged = true;


            if( ! insert )
            if( ! insert )
                list->Append( libfilename );
                list->Append( libfilename );
Loading