X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0463eea95d0d2d38e23f076c7ab621e986d36093..14ac4e3a8e8b07360b59be2f49451e85c81d6f7e:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 70667b9e07..50eea047b9 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -686,7 +686,10 @@ size_t wxDataObject::GetBufferOffset(const wxDataFormat& format ) const void* wxDataObject::GetSizeFromBuffer( const void* buffer, size_t* size, const wxDataFormat& format ) { - size_t realsz = ::HeapSize(::GetProcessHeap(), 0, buffer); + // hack: the third parameter is declared non-const in Wine's headers so + // cast away the const + size_t realsz = ::HeapSize(::GetProcessHeap(), 0, + wx_const_cast(void*, buffer)); if ( realsz == (size_t)-1 ) { // note that HeapSize() does not set last error