diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-01-01 20:05:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-01 20:05:42 +0100 |
| commit | a63ad76603accc70747a2073c78139299064c43b (patch) | |
| tree | b64302ca02847a73d9c8445c11023cfc34314dff /src/Fl_MacOS_Sys_Menu_Bar.mm | |
| parent | 23e8d831a868774c014993d52eead0cbe105f218 (diff) | |
FLUID refactor and macOS warnings removed (#623)
P renamed to g_project
class Project renamed to class Fluid_Project
fixes macOS type cast warnings
Diffstat (limited to 'src/Fl_MacOS_Sys_Menu_Bar.mm')
| -rw-r--r-- | src/Fl_MacOS_Sys_Menu_Bar.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm index 939a3a3d4..6fdebdaef 100644 --- a/src/Fl_MacOS_Sys_Menu_Bar.mm +++ b/src/Fl_MacOS_Sys_Menu_Bar.mm @@ -120,14 +120,14 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@"; NSMenu* this_menu = [self menu]; NSInteger flRank = [this_menu indexOfItem:self]; NSInteger last = [this_menu numberOfItems] - 1; - int from = flRank; + int from = (int)flRank; while(from > 0) { if ([[this_menu itemAtIndex:from-1] isSeparatorItem]) break; item = [(FLMenuItem*)[this_menu itemAtIndex:from-1] getFlItem]; if ( !(item->flags & FL_MENU_RADIO) ) break; from--; } - int to = flRank; + int to = (int)flRank; while (to < last) { if ([[this_menu itemAtIndex:to+1] isSeparatorItem]) break; item = [(FLMenuItem*)[this_menu itemAtIndex:to+1] getFlItem]; @@ -228,7 +228,7 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@"; } [menu addItem:item]; [item setTarget:item]; - int retval = [menu indexOfItem:item]; + int retval = (int)[menu indexOfItem:item]; [item release]; return retval; } @@ -355,7 +355,7 @@ static void createSubMenu( NSMenu *mh, pFl_Menu_Item &mm, const Fl_Menu_Item *m [submenu setAutoenablesItems:NO]; int cnt; - cnt = [mh numberOfItems]; + cnt = (int)[mh numberOfItems]; cnt--; menuItem = [mh itemAtIndex:cnt]; [menuItem setSubmenu:submenu]; @@ -401,7 +401,7 @@ static void convertToMenuBar(const Fl_Menu_Item *mm) { NSMenu *fl_system_menu = [NSApp mainMenu]; int count;//first, delete all existing system menus - count = [fl_system_menu numberOfItems]; + count = (int)[fl_system_menu numberOfItems]; for(int i = count - 1; i > 0; i--) { [fl_system_menu removeItem:[fl_system_menu itemAtIndex:i]]; } |
