Add casts from long to LONG to fix 64 bit Cygwin wxMSW build.

In 64 bits, LONG is actually defined as int in Cygwin gcc headers, so is
different from long -- even if both types use identical representation.

Just add the casts to fix this for now, as this is the smallest ABI-preserving
change. Ideally, something better and less ugly would need to be done in the
future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-05-12 13:14:24 +00:00
parent f825884f74
commit 8b7398889d
2 changed files with 4 additions and 4 deletions

View File

@ -267,7 +267,7 @@ public:
internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) )
if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false;
return Convertor::ToArray(element, *data);
@ -284,7 +284,7 @@ public:
internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) )
if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false;
return Convertor::FromArray(*data, element);

View File

@ -74,7 +74,7 @@ bool wxSafeArrayBase::GetLBound(size_t dim, long& bound) const
wxCHECK_MSG( m_array, false, wxS("Uninitialized safe array") );
wxCHECK_MSG( dim > 0, false, wxS("Invalid dimension index") );
HRESULT hr = SafeArrayGetLBound(m_array, dim, &bound);
HRESULT hr = SafeArrayGetLBound(m_array, dim, (LONG*)&bound);
if ( FAILED(hr) )
{
wxLogApiError(wxS("SafeArrayGetLBound()"), hr);
@ -88,7 +88,7 @@ bool wxSafeArrayBase::GetUBound(size_t dim, long& bound) const
wxCHECK_MSG( m_array, false, wxS("Uninitialized safe array") );
wxCHECK_MSG( dim > 0, false, wxS("Invalid dimension index") );
HRESULT hr = SafeArrayGetUBound(m_array, dim, &bound);
HRESULT hr = SafeArrayGetUBound(m_array, dim, (LONG*)&bound);
if ( FAILED(hr) )
{
wxLogApiError(wxS("SafeArrayGetUBound()"), hr);