From: David Elliott Date: Sat, 30 Oct 2004 06:23:38 +0000 (+0000) Subject: CodeWarrior (8.3 mwcc) can't figure out that it needs to do C++ automatic X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5447d1e1e3ba970595ba1aaee2772ccae12e3366 CodeWarrior (8.3 mwcc) can't figure out that it needs to do C++ automatic conversion from wxObjcAutoRefFromAlloc to NSButton* when it is used as the receiver of a message. Help it along with a static_cast. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/button.mm b/src/cocoa/button.mm index 1774dd66ea..5ae10895f6 100644 --- a/src/cocoa/button.mm +++ b/src/cocoa/button.mm @@ -96,10 +96,10 @@ static NSRect MakeNSButtonDefaultRect() // create at (10.0,10.0) with size 20.0x20.0 (just bogus values) wxObjcAutoRefFromAlloc defaultButton = [[NSButton alloc] initWithFrame:NSMakeRect(10.0,10.0,20.0,20.0)]; - [defaultButton setBezelStyle:NSRoundedBezelStyle]; - [defaultButton setTitle:@""]; - [defaultButton sizeToFit]; - return [defaultButton frame]; + [static_cast(defaultButton) setBezelStyle:NSRoundedBezelStyle]; + [static_cast(defaultButton) setTitle:@""]; + [static_cast(defaultButton) sizeToFit]; + return [static_cast(defaultButton) frame]; } wxSize wxButtonBase::GetDefaultSize()