Cleanup accessor code

This commit is contained in:
Stefan Csomor
2018-07-30 18:03:01 +02:00
parent 4bda27c96c
commit d553859812

View File

@@ -50,10 +50,7 @@ public:
{ {
wxASSERT(idx < size()); wxASSERT(idx < size());
CFTypeRef val = CFArrayGetValueAtIndex(this->m_ptr, idx); return wxCFRefFromGet((E)CFArrayGetValueAtIndex(this->m_ptr, idx));
if (val)
::CFRetain(val);
return wxCFRefFromGet<E>(val);
} }
wxCFRef<E> operator[](size_type idx) { return at(idx); } wxCFRef<E> operator[](size_type idx) { return at(idx); }