Avoid some -Wduplicated-branches warnings

This commit is contained in:
Paul Cornett
2022-03-21 11:54:30 -07:00
parent e9e1023393
commit b4475c881a
3 changed files with 26 additions and 43 deletions

View File

@@ -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;