From: Vadim Zeitlin Date: Tue, 26 Jan 2010 09:01:08 +0000 (+0000) Subject: Avoid g++ warning about unhandled wxFONTFAMILY_XXX value in a switch. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a4a0bff1662e9c729e95baf12082aa6144df48c8?ds=inline Avoid g++ warning about unhandled wxFONTFAMILY_XXX value in a switch. Add wxFONTFAMILY_UNKNOWN case to the switch as it will allow us to be warned if we add a new family in the future and forget to update this code to take it into account. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 499478eace..3add9ac4cc 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -663,6 +663,10 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) case wxFONTFAMILY_DEFAULT: ff_family = FF_SWISS; break; + + case wxFONTFAMILY_UNKNOWN: + wxFAIL_MSG( "invalid font family" ); + return; } wxCHECK_RET( ff_family != FF_DONTCARE, "unknown wxFontFamily" );