From 72972081194145624eedb25327a3e666bb93becd Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 29 Jun 2019 09:46:25 -0700 Subject: [PATCH] Handle all non-length units Statusbar length updates need to handle default with wxASSERT if there is not a specific, handled unit. --- eeschema/sch_base_frame.cpp | 2 +- gerbview/gerbview_frame.cpp | 4 ++-- pagelayout_editor/pl_editor_frame.cpp | 2 +- pcbnew/pcb_base_frame.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 2d92ab31ef..0385355fa2 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -217,7 +217,7 @@ void SCH_BASE_FRAME::UpdateStatusBar() locformatter = "dx %f dy %f dist %f"; break; - case DEGREES: + default: wxASSERT( false ); break; } diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 9ac511438f..dd7963d3ae 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -1043,7 +1043,7 @@ void GERBVIEW_FRAME::UpdateStatusBar() case INCHES: formatter = wxT( "r %.6f theta %.1f" ); break; case MILLIMETRES: formatter = wxT( "r %.5f theta %.1f" ); break; case UNSCALED_UNITS: formatter = wxT( "r %f theta %f" ); break; - case DEGREES: wxASSERT( false ); break; + default: wxASSERT( false ); break; } line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta ); @@ -1075,7 +1075,7 @@ void GERBVIEW_FRAME::UpdateStatusBar() relformatter = wxT( "dx %f dy %f dist %f" ); break; - case DEGREES: + default: wxASSERT( false ); break; } diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 126010f376..e43e660642 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -591,7 +591,7 @@ void PL_EDITOR_FRAME::UpdateStatusBar() case INCHES: SetStatusText( _("inches"), 6 ); break; case MILLIMETRES: SetStatusText( _("mm"), 6 ); break; case UNSCALED_UNITS: SetStatusText( wxEmptyString, 6 ); break; - case DEGREES: wxASSERT( false ); break; + default: wxASSERT( false ); break; } wxString line; diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 88ee2488d4..aaf24fa7c3 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -629,7 +629,7 @@ void PCB_BASE_FRAME::UpdateStatusBar() case INCHES: formatter = wxT( "r %.6f theta %.1f" ); break; case MILLIMETRES: formatter = wxT( "r %.6f theta %.1f" ); break; case UNSCALED_UNITS: formatter = wxT( "r %f theta %f" ); break; - case DEGREES: wxASSERT( false ); break; + default: wxASSERT( false ); break; } line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta ); @@ -662,7 +662,7 @@ void PCB_BASE_FRAME::UpdateStatusBar() locformatter = "dx %f dy %f dist %f"; break; - case DEGREES: + default: wxASSERT( false ); break; }