Using 'new-style' AssertMacros to support compilation for macOS 10.3 and iOS 11

To avoid collisions with boost and c++ standard library using the assert macros starting with two underscores is the default under these new SDKs. Since they already existed in our minimum deploment SDK we can switch them safely.
This commit is contained in:
Stefan Csomor
2017-07-15 13:30:59 +02:00
parent a770cd8d79
commit 175c62d3f3
5 changed files with 13 additions and 13 deletions

View File

@@ -866,7 +866,7 @@ void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec )
FSRef fsRef;
wxMacPathToFSRef( path , &fsRef );
err = FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, spec, NULL);
verify_noerr( err );
__Verify_noErr(err);
}
#endif

View File

@@ -328,7 +328,7 @@ bool wxIcon::LoadIconFromSystemResource(const wxString& resourceName, int desire
if ( theId != 0 )
{
IconRef iconRef = NULL ;
verify_noerr( GetIconRef( kOnSystemDisk, kSystemIconsCreator, theId, &iconRef ) ) ;
__Verify_noErr(GetIconRef( kOnSystemDisk, kSystemIconsCreator, theId, &iconRef )) ;
if ( iconRef )
{
m_refData = new wxIconRefData( (WXHICON) iconRef, desiredWidth, desiredHeight ) ;

View File

@@ -1021,7 +1021,7 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y)
AllocExclusive();
verify_noerr( HIShapeOffset( M_REGION , x , y ) ) ;
__Verify_noErr(HIShapeOffset( M_REGION , x , y )) ;
return true ;
}
@@ -1076,11 +1076,11 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)
switch (op)
{
case wxRGN_AND:
verify_noerr( HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ) );
__Verify_noErr(HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ));
break ;
case wxRGN_OR:
verify_noerr( HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ) );
__Verify_noErr(HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ));
break ;
case wxRGN_XOR:
@@ -1088,12 +1088,12 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)
// XOR is defined as the difference between union and intersection
wxCFRef< HIShapeRef > unionshape( HIShapeCreateUnion( M_REGION , OTHER_M_REGION(region) ) );
wxCFRef< HIShapeRef > intersectionshape( HIShapeCreateIntersection( M_REGION , OTHER_M_REGION(region) ) );
verify_noerr( HIShapeDifference( unionshape, intersectionshape, M_REGION ) );
__Verify_noErr(HIShapeDifference( unionshape, intersectionshape, M_REGION ));
}
break ;
case wxRGN_DIFF:
verify_noerr( HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION ) ) ;
__Verify_noErr(HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION )) ;
break ;
case wxRGN_COPY:

View File

@@ -163,7 +163,7 @@ wxMutexInternal::wxMutexInternal( wxMutexType WXUNUSED(mutexType) )
m_isOk = false;
m_critRegion = kInvalidID;
verify_noerr( MPCreateCriticalRegion( &m_critRegion ) );
__Verify_noErr(MPCreateCriticalRegion( &m_critRegion ));
m_isOk = ( m_critRegion != kInvalidID );
if ( !IsOk() )
{
@@ -278,7 +278,7 @@ wxSemaphoreInternal::wxSemaphoreInternal( int initialcount, int maxcount)
// make it practically infinite
maxcount = INT_MAX;
verify_noerr( MPCreateSemaphore( maxcount, initialcount, &m_semaphore ) );
__Verify_noErr(MPCreateSemaphore( maxcount, initialcount, &m_semaphore ));
m_isOk = ( m_semaphore != kInvalidID );
if ( !IsOk() )
@@ -603,7 +603,7 @@ OSStatus wxThreadInternal::MacThreadStart(void *parameter)
wxThreadInternal *pthread = thread->m_internal;
// add to TLS so that This() will work
verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , (TaskStorageValue) thread ) ) ;
__Verify_noErr(MPSetTaskStorageValue( gs_tlsForWXThread , (TaskStorageValue) thread )) ;
// have to declare this before pthread_cleanup_push() which defines a
// block!
@@ -1219,8 +1219,8 @@ bool wxThreadModule::OnInit()
}
// main thread's This() is NULL
verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ;
verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread, 0 ) ) ;
__Verify_noErr(MPAllocateTaskStorageIndex( &gs_tlsForWXThread )) ;
__Verify_noErr(MPSetTaskStorageValue( gs_tlsForWXThread, 0 )) ;
wxThread::ms_idMainThread = wxThread::GetCurrentId();
gs_critsectWaitingForGui = new wxCriticalSection();

View File

@@ -973,7 +973,7 @@ IconRef wxBitmap::GetIconRef() const
IconRef wxBitmap::CreateIconRef() const
{
IconRef icon = GetIconRef();
verify_noerr( AcquireIconRef(icon) );
__Verify_noErr(AcquireIconRef(icon));
return icon;
}
#endif