]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/hid.cpp
Silence some warnings
[wxWidgets.git] / src / mac / corefoundation / hid.cpp
index 8cd855282ae3b70a8f8bd609d4c39413404abee8..a4a9a6ea3779ff5523b8b30343894d41616f69be 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        hid.cpp
+// Name:        src/mac/corefoundation/hid.cpp
 // Purpose:     DARWIN HID layer for WX Implementation
 // Author:      Ryan Norton
 // Modified by:
@@ -111,7 +111,8 @@ bool wxHIDDevice::Create (int nClass, int nType, int nDev)
     //Now get the maching services
     io_iterator_t pIterator;
     wxIOCHECK(IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator), "No Matching HID Services");
-    wxASSERT_MSG(pIterator != 0, wxT("No devices found!"));
+    if(pIterator == 0)
+        return false; // No devices found
 
     //Now we iterate through them
     io_object_t pObject;
@@ -207,7 +208,7 @@ USB Product Name
     return true;
 }//end Create()
 
-int wxHIDDevice::GetCount (int nClass, int nType)
+size_t wxHIDDevice::GetCount (int nClass, int nType)
 {
     mach_port_t             m_pPort;
 
@@ -247,7 +248,7 @@ int wxHIDDevice::GetCount (int nClass, int nType)
     //Now we iterate through them
     io_object_t pObject;
 
-    int nCount = 0;
+    size_t nCount = 0;
 
     while ( (pObject = IOIteratorNext(pIterator)) != 0)
         ++nCount;