Avoid -Wcast-qual warning

This commit is contained in:
Paul Cornett
2020-07-20 08:14:06 -07:00
parent de7ab5527b
commit 6a2005945a

View File

@@ -68,8 +68,8 @@ template <class Type>
inline Type* wxCFAutorelease(Type *r) inline Type* wxCFAutorelease(Type *r)
{ {
if ( r != NULL ) if ( r != NULL )
return (Type*)::CFAutorelease((CFTypeRef)r); r = const_cast<Type*>(static_cast<const Type*>(::CFAutorelease(static_cast<CFTypeRef>(r))));
return NULL; return r;
} }
/*! @function wxCFRetain /*! @function wxCFRetain