From 59576592b815f62ca78c04851c0b3fd7fa0eb9bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 21 Sep 2013 09:28:39 +0000 Subject: [PATCH] Fix wxOSX warnings about int-to-void* casts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/dataobj.h | 2 +- src/osx/carbon/dataobj.cpp | 4 ++-- src/osx/core/hid.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/osx/dataobj.h b/include/wx/osx/dataobj.h index 375d7d4079..45a73f289f 100644 --- a/include/wx/osx/dataobj.h +++ b/include/wx/osx/dataobj.h @@ -24,7 +24,7 @@ public: #endif virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; - void AddToPasteboard( void * pasteboardRef , int itemID ); + void AddToPasteboard( void * pasteboardRef , wxIntPtr itemID ); // returns true if the passed in format is present in the pasteboard static bool IsFormatInPasteboard( void * pasteboardRef, const wxDataFormat &dataFormat ); // returns true if any of the accepted formats of this dataobj is in the pasteboard diff --git a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp index 645733f8f4..2b625d0e06 100644 --- a/src/osx/carbon/dataobj.cpp +++ b/src/osx/carbon/dataobj.cpp @@ -259,7 +259,7 @@ bool wxDataObject::IsSupportedFormat( const wxDataFormat& rFormat, Direction vDi return found; } -void wxDataObject::AddToPasteboard( void * pb, int itemID ) +void wxDataObject::AddToPasteboard( void * pb, wxIntPtr itemID ) { PasteboardRef pasteboard = (PasteboardRef) pb; // get formats from wxDataObjects @@ -301,7 +301,7 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID ) memset( buf, 0, sz ); if ( GetDataHere( thisFormat, buf ) ) { - int counter = 1 ; + wxIntPtr counter = 1 ; if ( thisFormat.GetType() == wxDF_FILENAME ) { // the data is D-normalized UTF8 strings of filenames delimited with \n diff --git a/src/osx/core/hid.cpp b/src/osx/core/hid.cpp index 10faa7d10e..92c874aa26 100644 --- a/src/osx/core/hid.cpp +++ b/src/osx/core/hid.cpp @@ -378,7 +378,7 @@ bool wxHIDDevice::IsActive(int nIndex) // ---------------------------------------------------------------------------- bool wxHIDDevice::HasElement(int nIndex) { - return (void*) m_pCookies[nIndex] != NULL; + return m_pCookies[nIndex] != 0; } // ---------------------------------------------------------------------------- -- 2.45.2