Avoid some -Wduplicated-branches warnings
This commit is contained in:
@@ -428,52 +428,56 @@ bool wxPrintfConvSpec<CharType>::Parse(const CharType *format)
|
||||
break;
|
||||
|
||||
case wxT('c'):
|
||||
#if wxUSE_UNICODE
|
||||
if (ilen == -1)
|
||||
{
|
||||
// in Unicode mode %hc == ANSI character
|
||||
// and in ANSI mode, %hc == %c == ANSI...
|
||||
// %hc == ANSI character
|
||||
m_type = wxPAT_CHAR;
|
||||
}
|
||||
else if (ilen == 1)
|
||||
else
|
||||
{
|
||||
// in ANSI mode %lc == Unicode character
|
||||
// and in Unicode mode, %lc == %c == Unicode...
|
||||
// %lc == %c == Unicode character
|
||||
m_type = wxPAT_WCHAR;
|
||||
}
|
||||
#else
|
||||
if (ilen == 1)
|
||||
{
|
||||
// %lc == Unicode character
|
||||
m_type = wxPAT_WCHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
// in Unicode mode, %c == Unicode character
|
||||
m_type = wxPAT_WCHAR;
|
||||
#else
|
||||
// in ANSI mode, %c == ANSI character
|
||||
// %hc == %c == ANSI character
|
||||
m_type = wxPAT_CHAR;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
done = true;
|
||||
break;
|
||||
|
||||
case wxT('s'):
|
||||
#if wxUSE_UNICODE
|
||||
if (ilen == -1)
|
||||
{
|
||||
// Unicode mode wx extension: we'll let %hs mean non-Unicode
|
||||
// strings (when in ANSI mode, %s == %hs == ANSI string)
|
||||
// wx extension: we'll let %hs mean non-Unicode strings
|
||||
m_type = wxPAT_PCHAR;
|
||||
}
|
||||
else if (ilen == 1)
|
||||
else
|
||||
{
|
||||
// in Unicode mode, %ls == %s == Unicode string
|
||||
// in ANSI mode, %ls == Unicode string
|
||||
// %ls == %s == Unicode string
|
||||
m_type = wxPAT_PWCHAR;
|
||||
}
|
||||
#else
|
||||
if (ilen == 1)
|
||||
{
|
||||
// %ls == Unicode string
|
||||
m_type = wxPAT_PWCHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
m_type = wxPAT_PWCHAR;
|
||||
#else
|
||||
// %s == %hs == ANSI string
|
||||
m_type = wxPAT_PCHAR;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
done = true;
|
||||
break;
|
||||
|
||||
|
||||
@@ -885,6 +885,7 @@ wxDateTime::Country wxDateTime::GetCountry()
|
||||
struct tm *tm = wxLocaltime_r(&t, &tmstruct);
|
||||
|
||||
wxString tz = wxCallStrftime(wxS("%Z"), tm);
|
||||
ms_country = USA;
|
||||
if ( tz == wxT("WET") || tz == wxT("WEST") ||
|
||||
tz == wxT("BST") || tz == wxT("GMT") )
|
||||
{
|
||||
@@ -898,19 +899,6 @@ wxDateTime::Country wxDateTime::GetCountry()
|
||||
{
|
||||
ms_country = Russia;
|
||||
}
|
||||
else if ( tz == wxT("AST") || tz == wxT("ADT") ||
|
||||
tz == wxT("EST") || tz == wxT("EDT") ||
|
||||
tz == wxT("CST") || tz == wxT("CDT") ||
|
||||
tz == wxT("MST") || tz == wxT("MDT") ||
|
||||
tz == wxT("PST") || tz == wxT("PDT") )
|
||||
{
|
||||
ms_country = USA;
|
||||
}
|
||||
else
|
||||
{
|
||||
// well, choose a default one
|
||||
ms_country = USA;
|
||||
}
|
||||
}
|
||||
|
||||
return ms_country;
|
||||
|
||||
@@ -6368,19 +6368,10 @@ void wxWindowGTK::GTKScrolledWindowSetBorder(GtkWidget* w, int wxstyle)
|
||||
//as well...
|
||||
if (!(wxstyle & wxNO_BORDER) && !(wxstyle & wxBORDER_STATIC))
|
||||
{
|
||||
GtkShadowType gtkstyle;
|
||||
GtkShadowType gtkstyle = GTK_SHADOW_IN;
|
||||
|
||||
if(wxstyle & wxBORDER_RAISED)
|
||||
gtkstyle = GTK_SHADOW_OUT;
|
||||
else if ((wxstyle & wxBORDER_SUNKEN) || (wxstyle & wxBORDER_THEME))
|
||||
gtkstyle = GTK_SHADOW_IN;
|
||||
#if 0
|
||||
// Now obsolete
|
||||
else if (wxstyle & wxBORDER_DOUBLE)
|
||||
gtkstyle = GTK_SHADOW_ETCHED_IN;
|
||||
#endif
|
||||
else //default
|
||||
gtkstyle = GTK_SHADOW_IN;
|
||||
|
||||
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(w),
|
||||
gtkstyle );
|
||||
|
||||
Reference in New Issue
Block a user