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/branches/WX_3_0_BRANCH@76513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-12 13:16:02 +00:00
parent e3c2618169
commit 1902f64b6b
2 changed files with 4 additions and 4 deletions

View File

@@ -267,7 +267,7 @@ public:
internT* data; internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) ) if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false; return false;
return Convertor::ToArray(element, *data); return Convertor::ToArray(element, *data);
@@ -284,7 +284,7 @@ public:
internT* data; internT* data;
if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) ) if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) )
return false; return false;
return Convertor::FromArray(*data, element); 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( m_array, false, wxS("Uninitialized safe array") );
wxCHECK_MSG( dim > 0, false, wxS("Invalid dimension index") ); 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) ) if ( FAILED(hr) )
{ {
wxLogApiError(wxS("SafeArrayGetLBound()"), 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( m_array, false, wxS("Uninitialized safe array") );
wxCHECK_MSG( dim > 0, false, wxS("Invalid dimension index") ); 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) ) if ( FAILED(hr) )
{ {
wxLogApiError(wxS("SafeArrayGetUBound()"), hr); wxLogApiError(wxS("SafeArrayGetUBound()"), hr);