]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected signed/unsigned comparison warnings
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Aug 2006 21:12:50 +0000 (21:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Aug 2006 21:12:50 +0000 (21:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/platinfo.cpp

index 998d0e964e4f81a8736a55aa5c38db61bbe0571c..4a6c50aa1d227c2261f6d15852fc48661d7d820a 100644 (file)
@@ -92,9 +92,9 @@ static wxString wxEndiannessNames[] =
 
 // returns log in base 2 of the value, this maps the enum values to the
 // corresponding indices
-static int wxGetIndexFromEnumValue(int value)
+static unsigned wxGetIndexFromEnumValue(int value)
 {
-    wxCHECK_MSG( value, -1, _T("invalid enum value") );
+    wxCHECK_MSG( value, (unsigned)-1, _T("invalid enum value") );
 
     int n = 0;
     while ( !(value & 1) )
@@ -185,7 +185,7 @@ wxString wxPlatformInfo::GetOperatingSystemFamilyName(wxOperatingSystemId os)
 
 wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os)
 {
-    const int idx = wxGetIndexFromEnumValue(os);
+    const unsigned idx = wxGetIndexFromEnumValue(os);
 
     wxCHECK_MSG( idx < WXSIZEOF(wxOperatingSystemIdNames), wxEmptyString,
                  _T("invalid OS id") );
@@ -195,7 +195,7 @@ wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os)
 
 wxString wxPlatformInfo::GetPortIdName(wxPortId port)
 {
-    const int idx = wxGetIndexFromEnumValue(port);
+    const unsigned idx = wxGetIndexFromEnumValue(port);
 
     wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString,
                  _T("invalid port id") );
@@ -210,7 +210,7 @@ wxString wxPlatformInfo::GetPortIdName(wxPortId port)
 
 wxString wxPlatformInfo::GetPortIdShortName(wxPortId port)
 {
-    const int idx = wxGetIndexFromEnumValue(port);
+    const unsigned idx = wxGetIndexFromEnumValue(port);
 
     wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString,
                  _T("invalid port id") );