From 6a2005945aafcd9e3e81661f815a7a2064a96cc7 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 20 Jul 2020 08:14:06 -0700 Subject: [PATCH] Avoid -Wcast-qual warning --- include/wx/osx/core/cfref.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/osx/core/cfref.h b/include/wx/osx/core/cfref.h index 1885307e88..ab2a8b4d8a 100644 --- a/include/wx/osx/core/cfref.h +++ b/include/wx/osx/core/cfref.h @@ -68,8 +68,8 @@ template inline Type* wxCFAutorelease(Type *r) { if ( r != NULL ) - return (Type*)::CFAutorelease((CFTypeRef)r); - return NULL; + r = const_cast(static_cast(::CFAutorelease(static_cast(r)))); + return r; } /*! @function wxCFRetain