Fix unreachable-code-return and unreachable-code-break warning

This commit is contained in:
Maarten Bent
2020-12-22 15:43:14 +01:00
parent 0438ca19c1
commit a6d309447a
6 changed files with 4 additions and 13 deletions

View File

@@ -1799,7 +1799,6 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
format.Replace("%y","%Y");
return format;
}
break;
default:
wxFAIL_MSG( "Unknown locale info" );

View File

@@ -2727,7 +2727,6 @@ wxDataObjectComposite* wxCocoaDataViewControl::GetDnDDataObjects(NSData* dataObj
return NULL;
}
}
break;
default:
return NULL;
}

View File

@@ -206,16 +206,14 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
case wxSYS_DEFAULT_GUI_FONT :
{
return wxFont(wxOSX_SYSTEM_FONT_SMALL) ;
} ;
break ;
}
case wxSYS_OEM_FIXED_FONT :
case wxSYS_ANSI_FIXED_FONT :
case wxSYS_SYSTEM_FIXED_FONT :
default :
{
return wxFont(wxOSX_SYSTEM_FONT_FIXED) ;
} ;
break ;
}
}
return *wxNORMAL_FONT;

View File

@@ -249,10 +249,8 @@ int wxCFEventLoop::DoDispatchTimeout(unsigned long timeout)
break;
case kCFRunLoopRunStopped:
return 0;
break;
case kCFRunLoopRunTimedOut:
return -1;
break;
case kCFRunLoopRunHandledSource:
default:
break;

View File

@@ -60,11 +60,9 @@ CGEventType CGEventTypeForMouseDrag(int button)
{
case wxMOUSE_BTN_LEFT:
return kCGEventLeftMouseDragged;
break;
case wxMOUSE_BTN_RIGHT:
return kCGEventRightMouseDragged;
break;
// All the other buttons use the constant OtherMouseDown but we still
// want to check for invalid parameters so assert first
@@ -74,7 +72,6 @@ CGEventType CGEventTypeForMouseDrag(int button)
case wxMOUSE_BTN_MIDDLE:
return kCGEventOtherMouseDragged;
break;
}
}

View File

@@ -437,9 +437,9 @@ bool wxUIActionSimulatorX11Impl::MouseMove(long x, long y)
}
return ret;
#endif
#else
return DoX11MouseMove(x, y);
#endif
}
bool wxUIActionSimulatorX11Impl::MouseUp(int button)