X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa8114de44a45d992e45912818307d8b1a5004ba..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/cocoa/ObjcRef.h diff --git a/include/wx/cocoa/ObjcRef.h b/include/wx/cocoa/ObjcRef.h index 2af1c2598a..17493d14da 100644 --- a/include/wx/cocoa/ObjcRef.h +++ b/include/wx/cocoa/ObjcRef.h @@ -9,6 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifndef _WX_COCOA_OBJCREF_H__ +#define _WX_COCOA_OBJCREF_H__ /* wxObjcAutoRefFromAlloc: construct a reference to an object that was [NSObject -alloc]'ed and thus does not need a retain @@ -23,7 +25,7 @@ class wxObjcAutoRefBase { protected: static struct objc_object* ObjcRetain(struct objc_object*); - static struct objc_object* ObjcRelease(struct objc_object*); + static void ObjcRelease(struct objc_object*); }; // T should be a pointer like NSObject* @@ -62,7 +64,7 @@ class wxObjcAutoRef: public wxObjcAutoRefFromAlloc public: wxObjcAutoRef(T p = 0) : wxObjcAutoRefFromAlloc(p) - { ObjcRetain(m_ptr); } + { ObjcRetain(wxObjcAutoRefFromAlloc::m_ptr); } ~wxObjcAutoRef() {} wxObjcAutoRef(const wxObjcAutoRef& otherRef) : wxObjcAutoRefFromAlloc(otherRef) @@ -74,3 +76,4 @@ public: { return wxObjcAutoRefFromAlloc::operator=(otherRef); } }; +#endif //ndef _WX_COCOA_OBJCREF_H__