diff --git a/common/properties/pg_editors.cpp b/common/properties/pg_editors.cpp index 8fbd0da0cc..abe51eccef 100644 --- a/common/properties/pg_editors.cpp +++ b/common/properties/pg_editors.cpp @@ -428,6 +428,8 @@ void PG_RATIO_EDITOR::UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl ) wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( aCtrl ); wxVariant var = aProperty->GetValue(); + wxCHECK_MSG( textCtrl, /*void*/, wxT( "PG_RATIO_EDITOR must be used with a textCtrl!" ) ); + if( var.GetType() == wxT( "std::optional<double>" ) ) { auto* variantData = static_cast<STD_OPTIONAL_DOUBLE_VARIANT_DATA*>( var.GetData() ); diff --git a/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp index a41e859ff7..dbc8332888 100644 --- a/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_io/cadstar/cadstar_sch_archive_loader.cpp @@ -2657,7 +2657,7 @@ int CADSTAR_SCH_ARCHIVE_LOADER::getSheetNumber( LAYER_ID aCadstarSheetID ) void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetID, SCH_ITEM* aItem ) { - wxCHECK_MSG( aItem, /*void*/, "aItem is null" ); + wxCHECK_MSG( aItem, /*void*/, wxT( "aItem is null" ) ); if( aCadstarSheetID == "ALL_SHEETS" ) { @@ -2676,8 +2676,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI } else if( aCadstarSheetID == "NO_SHEET" ) { - wxASSERT_MSG( false, - "Trying to add an item to NO_SHEET? This might be a documentation symbol." ); + wxFAIL_MSG( wxT( "Trying to add an item to NO_SHEET? This might be a documentation symbol." ) ); } else { @@ -2688,7 +2687,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI else { delete aItem; - wxASSERT_MSG( false, "Unknown Sheet ID." ); + wxFAIL_MSG( wxT( "Unknown Sheet ID." ) ); } } } diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index d61d363e0a..3c4c398a25 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -289,7 +289,7 @@ wxString SCH_TEXT::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraTe void SCH_TEXT::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const { wxCHECK_MSG( IsHypertext(), /* void */, - "Calling a hypertext menu on a SCH_TEXT with no hyperlink?" ); + wxT( "Calling a hypertext menu on a SCH_TEXT with no hyperlink?" ) ); SCH_NAVIGATE_TOOL* navTool = aFrame->GetToolManager()->GetTool<SCH_NAVIGATE_TOOL>(); navTool->HypertextCommand( m_hyperlink ); diff --git a/eeschema/sch_textbox.cpp b/eeschema/sch_textbox.cpp index 7cb9adba4a..ea852e276a 100644 --- a/eeschema/sch_textbox.cpp +++ b/eeschema/sch_textbox.cpp @@ -354,7 +354,7 @@ bool SCH_TEXTBOX::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) void SCH_TEXTBOX::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const { wxCHECK_MSG( IsHypertext(), /* void */, - "Calling a hypertext menu on a SCH_TEXTBOX with no hyperlink?" ); + wxT( "Calling a hypertext menu on a SCH_TEXTBOX with no hyperlink?" ) ); SCH_NAVIGATE_TOOL* navTool = aFrame->GetToolManager()->GetTool<SCH_NAVIGATE_TOOL>(); navTool->HypertextCommand( m_hyperlink ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 5eca43709a..adf8807d02 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -363,8 +363,8 @@ public: */ virtual void SetLayerDepth( double aLayerDepth ) { - wxCHECK_MSG( aLayerDepth <= m_depthRange.y, /* void */, "SetLayerDepth: below minimum" ); - wxCHECK_MSG( aLayerDepth >= m_depthRange.x, /* void */, "SetLayerDepth: above maximum" ); + wxCHECK_MSG( aLayerDepth <= m_depthRange.y, /*void*/, wxT( "SetLayerDepth: below minimum" ) ); + wxCHECK_MSG( aLayerDepth >= m_depthRange.x, /*void*/, wxT( "SetLayerDepth: above maximum" ) ); m_layerDepth = aLayerDepth; }