git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40685
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// constants
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
-static wxString wxOperatingSystemIdNames[] =
+static const wxChar* const wxOperatingSystemIdNames[] =
{
_T("Apple Mac OS"),
_T("Apple Mac OS X"),
{
_T("Apple Mac OS"),
_T("Apple Mac OS X"),
-static wxString wxPortIdNames[] =
+static const wxChar* const wxPortIdNames[] =
{
_T("wxBase"),
_T("wxMSW"),
{
_T("wxBase"),
_T("wxMSW"),
-static wxString wxArchitectureNames[] =
+static const wxChar* const wxArchitectureNames[] =
{
_T("32 bit"),
_T("64 bit")
};
{
_T("32 bit"),
_T("64 bit")
};
-static wxString wxEndiannessNames[] =
+static const wxChar* const wxEndiannessNames[] =
{
_T("Big endian"),
_T("Little endian"),
{
_T("Big endian"),
_T("Little endian"),
wxString wxPlatformInfo::GetOperatingSystemFamilyName(wxOperatingSystemId os)
{
wxString wxPlatformInfo::GetOperatingSystemFamilyName(wxOperatingSystemId os)
{
+ const wxChar* string = _T("Unknown");
- return _T("Macintosh");
+ string = _T("Macintosh");
else if ( os & wxOS_WINDOWS )
else if ( os & wxOS_WINDOWS )
+ string = _T("Windows");
else if ( os & wxOS_UNIX )
else if ( os & wxOS_UNIX )
else if ( os == wxOS_DOS )
else if ( os == wxOS_DOS )
else if ( os == wxOS_OS2 )
else if ( os == wxOS_OS2 )
}
wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os)
}
wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os)
{
for ( size_t i = 0; i < WXSIZEOF(wxOperatingSystemIdNames); i++ )
{
{
for ( size_t i = 0; i < WXSIZEOF(wxOperatingSystemIdNames); i++ )
{
- if ( wxOperatingSystemIdNames[i].CmpNoCase(str) == 0 )
+ if ( wxString(wxOperatingSystemIdNames[i]).CmpNoCase(str) == 0 )
return (wxOperatingSystemId)(1 << i);
}
return (wxOperatingSystemId)(1 << i);
}
{
wxPortId current = (wxPortId)(1 << i);
{
wxPortId current = (wxPortId)(1 << i);
- if ( wxPortIdNames[i].CmpNoCase(str) == 0 )
- return current;
- if ( GetPortIdShortName(current, true).CmpNoCase(str) == 0 ||
+ if ( wxString(wxPortIdNames[i]).CmpNoCase(str) == 0 ||
+ GetPortIdShortName(current, true).CmpNoCase(str) == 0 ||
GetPortIdShortName(current, false).CmpNoCase(str) == 0 )
return current;
}
GetPortIdShortName(current, false).CmpNoCase(str) == 0 )
return current;
}