]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlgosx.mm
fix warnings about unused parameters/variables in release build
[wxWidgets.git] / src / mac / carbon / fontdlgosx.mm
index a0e78b064dc08658e82dccf5d81fe986d3495a99..55071430b2d9495313fe57fa0026edf1c1947914 100644 (file)
 {
     [super initWithFrame:rectBox];
 
-    wxMacCFStringHolder cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
-    wxMacCFStringHolder cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
+    wxCFStringRef cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
+    wxCFStringRef cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
 
     NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82  , 24 );
     NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82  , 24 );
 
     NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel];
-    [cancelButton setTitle:(NSString*)cfCancelString.Detach()];
+    [cancelButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfCancelString)];
     [cancelButton setBezelStyle:NSRoundedBezelStyle];
     [cancelButton setButtonType:NSMomentaryPushInButton];
     [cancelButton setAction:@selector(cancelPressed:)];
@@ -80,7 +80,7 @@
     m_cancelButton = cancelButton ;
 
     NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK];
-    [okButton setTitle:(NSString*)cfOkString.Detach()];
+    [okButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfOkString)];
     [okButton setBezelStyle:NSRoundedBezelStyle];
     [okButton setButtonType:NSMomentaryPushInButton];
     [okButton setAction:@selector(okPressed:)];
@@ -141,8 +141,10 @@ int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog))
 {
     int retval = wxID_CANCEL ;
 
-    bool cocoaLoaded = NSApplicationLoad();
-    wxASSERT_MSG(cocoaLoaded,wxT("Couldn't load Cocoa in Carbon Environment")) ;
+    if ( !NSApplicationLoad() )
+    {
+        wxFAIL_MSG("Couldn't load Cocoa in Carbon Environment");
+    }
 
     wxAutoNSAutoreleasePool pool;