Format .m files

This commit is contained in:
Chris Thrasher 2022-07-11 23:43:51 -06:00 committed by Lukas Dürrenberger
parent dd0f0ff4c6
commit 55a1a2a4c4
6 changed files with 53 additions and 66 deletions

View File

@ -22,7 +22,7 @@ endif()
# Run
set(SOURCES "")
foreach(FOLDER IN ITEMS examples include src test tools)
file(GLOB_RECURSE folder_files "${FOLDER}/*.h" "${FOLDER}/*.hpp" "${FOLDER}/*.inl" "${FOLDER}/*.cpp" "${FOLDER}/*.mm")
file(GLOB_RECURSE folder_files "${FOLDER}/*.h" "${FOLDER}/*.hpp" "${FOLDER}/*.inl" "${FOLDER}/*.cpp" "${FOLDER}/*.mm" "${FOLDER}/*.m")
list(FILTER folder_files EXCLUDE REGEX "gl.h|vulkan.h|stb_perlin.h") # 3rd party code to exclude from formatting
list(APPEND SOURCES ${folder_files})
endforeach()

View File

@ -126,18 +126,14 @@
[appleMenu addItem:[NSMenuItem separatorItem]];
// PREFERENCES
[appleMenu addItemWithTitle:@"Preferences..."
action:nil
keyEquivalent:@""];
[appleMenu addItemWithTitle:@"Preferences..." action:nil keyEquivalent:@""];
// SEPARATOR
[appleMenu addItem:[NSMenuItem separatorItem]];
// SERVICES
NSMenu* serviceMenu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
NSMenuItem* serviceItem = [appleMenu addItemWithTitle:@"Services"
action:nil
keyEquivalent:@""];
NSMenuItem* serviceItem = [appleMenu addItemWithTitle:@"Services" action:nil keyEquivalent:@""];
[serviceItem setSubmenu:serviceMenu];
[NSApp setServicesMenu:serviceMenu];
@ -145,20 +141,17 @@
[appleMenu addItem:[NSMenuItem separatorItem]];
// HIDE
[appleMenu addItemWithTitle:[@"Hide " stringByAppendingString:appName]
action:@selector(hide:)
keyEquivalent:@"h"];
[appleMenu addItemWithTitle:[@"Hide " stringByAppendingString:appName] action:@selector(hide:) keyEquivalent:@"h"];
// HIDE OTHER
NSMenuItem* hideOtherItem = [appleMenu addItemWithTitle:@"Hide Others"
NSMenuItem* hideOtherItem = [appleMenu
addItemWithTitle:@"Hide Others"
action:@selector(hideOtherApplications:)
keyEquivalent:@"h"];
[hideOtherItem setKeyEquivalentModifierMask:(NSAlternateKeyMask | NSCommandKeyMask)];
// SHOW ALL
[appleMenu addItemWithTitle:@"Show All"
action:@selector(unhideAllApplications:)
keyEquivalent:@""];
[appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
// SEPARATOR
[appleMenu addItem:[NSMenuItem separatorItem]];
@ -186,7 +179,8 @@
NSMenu* fileMenu = [[NSMenu alloc] initWithTitle:@"File"];
// CLOSE WINDOW
NSMenuItem* closeItem = [[NSMenuItem alloc] initWithTitle:@"Close Window"
NSMenuItem* closeItem = [[NSMenuItem alloc]
initWithTitle:@"Close Window"
action:@selector(performClose:)
keyEquivalent:@"w"];
[fileMenu addItem:closeItem];
@ -211,24 +205,21 @@
NSMenu* windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
// MINIMIZE
NSMenuItem* minimizeItem = [[NSMenuItem alloc] initWithTitle:@"Minimize"
NSMenuItem* minimizeItem = [[NSMenuItem alloc]
initWithTitle:@"Minimize"
action:@selector(performMiniaturize:)
keyEquivalent:@"m"];
[windowMenu addItem:minimizeItem];
[minimizeItem release];
// ZOOM
[windowMenu addItemWithTitle:@"Zoom"
action:@selector(performZoom:)
keyEquivalent:@""];
[windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""];
// SEPARATOR
[windowMenu addItem:[NSMenuItem separatorItem]];
// BRING ALL TO FRONT
[windowMenu addItemWithTitle:@"Bring All to Front"
action:@selector(bringAllToFront:)
keyEquivalent:@""];
[windowMenu addItemWithTitle:@"Bring All to Front" action:@selector(bringAllToFront:) keyEquivalent:@""];
return windowMenu;
}
@ -278,5 +269,3 @@
@end

View File

@ -59,4 +59,3 @@
@end

View File

@ -37,4 +37,3 @@
}
@end