From d553859812149507b93dd8ccedb191350b1db6e0 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 30 Jul 2018 18:03:01 +0200 Subject: [PATCH] Cleanup accessor code --- include/wx/osx/core/cfarray.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/wx/osx/core/cfarray.h b/include/wx/osx/core/cfarray.h index b16c075625..1b58597bf0 100644 --- a/include/wx/osx/core/cfarray.h +++ b/include/wx/osx/core/cfarray.h @@ -50,10 +50,7 @@ public: { wxASSERT(idx < size()); - CFTypeRef val = CFArrayGetValueAtIndex(this->m_ptr, idx); - if (val) - ::CFRetain(val); - return wxCFRefFromGet(val); + return wxCFRefFromGet((E)CFArrayGetValueAtIndex(this->m_ptr, idx)); } wxCFRef operator[](size_type idx) { return at(idx); }