From 0e633c487298d3bf7e1163e00785456ae6e0637b Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 4 May 2015 17:00:46 +0000 Subject: Removed deprecation and implicit cast warnings. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Native_File_Chooser_MAC.mm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index 9f0a732bd..d09024d70 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -346,7 +346,7 @@ int Fl_Native_File_Chooser::get_saveas_basename(void) { char *q = strdup( [[[(NSSavePanel*)_panel URL] path] UTF8String] ); if ( !(_options & SAVEAS_CONFIRM) ) { const char *d = [[[[(NSSavePanel*)_panel URL] path] stringByDeletingLastPathComponent] UTF8String]; - int l = strlen(d) + 1; + int l = (int)strlen(d) + 1; if (strcmp(d, "/") == 0) l = 1; int lu = strlen(UNLIKELYPREFIX); // Remove UNLIKELYPREFIX between directory and filename parts @@ -532,7 +532,7 @@ int Fl_Native_File_Chooser::runmodal() NSString *dir = nil; NSString *fname = nil; NSString *preset = nil; - int retval; + NSInteger retval; if (_preset_file) { preset = [[NSString alloc] initWithUTF8String:_preset_file]; if (strchr(_preset_file, '/') != NULL) { @@ -551,7 +551,7 @@ int Fl_Native_File_Chooser::runmodal() } [dir release]; [preset release]; - return retval; + return (retval == NSFileHandlingPanelOKButton ? 1 : 0); } // POST BROWSER @@ -637,13 +637,13 @@ int Fl_Native_File_Chooser::post() { } int retval = runmodal(); if (_filt_total) { - _filt_value = [popup indexOfSelectedItem]; + _filt_value = (int)[popup indexOfSelectedItem]; } - if ( retval == NSOKButton ) { + if ( retval == 1 ) { if (is_open_panel) { clear_pathnames(); NSArray *array = [(NSOpenPanel*)_panel URLs]; - _tpathnames = [array count]; + _tpathnames = (int)[array count]; _pathnames = new char*[_tpathnames]; for(int i = 0; i < _tpathnames; i++) { _pathnames[i] = strnew([[(NSURL*)[array objectAtIndex:i] path] UTF8String]); @@ -653,7 +653,7 @@ int Fl_Native_File_Chooser::post() { } [key makeKeyWindow]; [localPool release]; - return (retval == NSOKButton ? 0 : 1); + return (retval == 1 ? 0 : 1); } #endif // __APPLE__ -- cgit v1.2.3