Fix wxOSX view comparison callback signature for older SDKs
Take NSView* in the callback used by [NSView sortSubviewsUsingFunction:context:] only when using 10.12 SDK, but not when using earlier ones, as the callback was still taking just "id" in them.
This commit is contained in:
		
				
					committed by
					
						 Vadim Zeitlin
						Vadim Zeitlin
					
				
			
			
				
	
			
			
			
						parent
						
							e851db7e9e
						
					
				
				
					commit
					a5bcf1dafd
				
			| @@ -2129,9 +2129,11 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show, | |||||||
|     return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); |     return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); | ||||||
| } | } | ||||||
|  |  | ||||||
| // To avoid warnings about incompatible pointer types with Xcode 7, we need to | // To avoid warnings about incompatible pointer types with macOS 10.12 SDK (and | ||||||
| // constrain the comparison function arguments instead of just using "id". | // maybe even earlier? This has changed at some time between 10.9 and 10.12), | ||||||
| #if __has_feature(objc_kindof) | // we need to constrain the comparison function arguments instead of just using | ||||||
|  | // "id". | ||||||
|  | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 && __has_feature(objc_kindof) | ||||||
| typedef __kindof NSView* KindOfView; | typedef __kindof NSView* KindOfView; | ||||||
| #else | #else | ||||||
| typedef id KindOfView; | typedef id KindOfView; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user