From a20c89288f730b32888fa1ff4aa3b70c9d67d98f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 18 Apr 2013 13:54:03 -0500 Subject: [PATCH] hide pageFmts[] since it is no longer NULL terminated and not global --- common/dialogs/dialog_page_settings.cpp | 2 +- pcbnew/class_pcb_text.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 18fe9c7366..dc1f93da08 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -51,7 +51,7 @@ // the translated and the not translated version. // when displayed in dialog we should explicitely call wxGetTranslation() // to show the translated version. -const wxString pageFmts[] = +static const wxString pageFmts[] = { _("A4 210x297mm"), _("A3 297x420mm"), diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index c5fc88bb37..89cbfed473 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -111,17 +111,18 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; - BOARD* board; - BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent; +#if defined(DEBUG) + BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent; wxASSERT( parent ); + BOARD* board; if( parent->Type() == PCB_DIMENSION_T ) board = (BOARD*) parent->GetParent(); else board = (BOARD*) parent; - wxASSERT( board ); +#endif if( m_Parent && m_Parent->Type() == PCB_DIMENSION_T ) aList.push_back( MSG_PANEL_ITEM( _( "Dimension" ), m_Text, DARKGREEN ) );