From 5808d4485f549a7792fc38082f8b880307e08485 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 23 Oct 2021 13:36:58 +0300 Subject: [PATCH] Drop BOOLs --- Cocoa/AppDelegate.m | 10 +++---- Cocoa/Document.m | 50 ++++++++++++++++----------------- Cocoa/GBAudioClient.m | 6 ++-- Cocoa/GBBorderView.m | 4 +-- Cocoa/GBCheatTextFieldCell.m | 2 +- Cocoa/GBCheatWindowController.m | 4 +-- Cocoa/GBColorCell.m | 2 +- Cocoa/GBOpenGLView.m | 2 +- Cocoa/GBPreferencesWindow.m | 30 ++++++++++---------- Cocoa/GBSplitView.m | 2 +- Cocoa/GBTerminalTextFieldCell.m | 4 +-- Cocoa/GBView.h | 2 +- Cocoa/GBView.m | 12 ++++---- Cocoa/GBViewGL.m | 6 ++-- Cocoa/GBViewMetal.m | 4 +-- Cocoa/GBWarningPopover.m | 4 +-- JoyKit/JOYController.m | 2 +- QuickLook/generator.m | 4 +-- 18 files changed, 75 insertions(+), 75 deletions(-) diff --git a/Cocoa/AppDelegate.m b/Cocoa/AppDelegate.m index 108a5c8..48514a0 100644 --- a/Cocoa/AppDelegate.m +++ b/Cocoa/AppDelegate.m @@ -86,7 +86,7 @@ static uint32_t color_to_int(NSColor *color) } if ([[NSProcessInfo processInfo].arguments containsObject:@"--update-launch"]) { - [NSApp activateIgnoringOtherApps:YES]; + [NSApp activateIgnoringOtherApps:true]; } } @@ -106,7 +106,7 @@ static uint32_t color_to_int(NSColor *color) NSRect new = [_preferencesWindow frameRectForContentRect:tab.frame]; new.origin.x = old.origin.x; new.origin.y = old.origin.y + (old.size.height - new.size.height); - [_preferencesWindow setFrame:new display:YES animate:_preferencesWindow.visible]; + [_preferencesWindow setFrame:new display:true animate:_preferencesWindow.visible]; [_preferencesWindow.contentView addSubview:tab]; } @@ -171,7 +171,7 @@ static uint32_t color_to_int(NSColor *color) - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification { - [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfFile:notification.identifier display:YES]; + [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfFile:notification.identifier display:true]; } - (void)updateFound @@ -242,7 +242,7 @@ static uint32_t color_to_int(NSColor *color) [[[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:@UPDATE_SERVER "/latest_version"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { dispatch_async(dispatch_get_main_queue(), ^{ [self.updatesSpinner stopAnimation:nil]; - [self.updatesButton setEnabled:YES]; + [self.updatesButton setEnabled:true]; }); if ([(NSHTTPURLResponse *)response statusCode] == 200) { NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; @@ -312,7 +312,7 @@ static uint32_t color_to_int(NSColor *color) _downloadDirectory = [[[NSFileManager defaultManager] URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:[[NSBundle mainBundle] bundleURL] - create:YES + create:true error:nil] path]; NSTask *unzipTask; if (!_downloadDirectory) { diff --git a/Cocoa/Document.m b/Cocoa/Document.m index dcd061f..2a54a13 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -321,7 +321,7 @@ static void infraredStateChanged(GB_gameboy_t *gb, bool on) { if (_gbsVisualizer) { dispatch_async(dispatch_get_main_queue(), ^{ - [_gbsVisualizer setNeedsDisplay:YES]; + [_gbsVisualizer setNeedsDisplay:true]; }); } [self.view flip]; @@ -422,7 +422,7 @@ static void infraredStateChanged(GB_gameboy_t *gb, bool on) if (![[NSUserDefaults standardUserDefaults] boolForKey:@"Mute"]) { [self.audioClient start]; } - hex_timer = [NSTimer timerWithTimeInterval:0.25 target:self selector:@selector(reloadMemoryView) userInfo:nil repeats:YES]; + hex_timer = [NSTimer timerWithTimeInterval:0.25 target:self selector:@selector(reloadMemoryView) userInfo:nil repeats:true]; [[NSRunLoop mainRunLoop] addTimer:hex_timer forMode:NSDefaultRunLoopMode]; /* Clear pending alarms, don't play alarms while playing */ @@ -502,7 +502,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) [audioLock unlock]; [self.audioClient stop]; self.audioClient = nil; - self.view.mouseHidingEnabled = NO; + self.view.mouseHidingEnabled = false; GB_save_battery(&gb, [[[self.fileURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sav"].path UTF8String]); GB_save_cheats(&gb, [[[self.fileURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"cht"].path UTF8String]); unsigned time_to_alarm = GB_time_to_alarm(&gb); @@ -684,13 +684,13 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) window_frame.size.width); window_frame.size.height = MAX([[NSUserDefaults standardUserDefaults] integerForKey:@"LastWindowHeight"], window_frame.size.height); - [self.mainWindow setFrame:window_frame display:YES]; + [self.mainWindow setFrame:window_frame display:true]; self.vramStatusLabel.cell.backgroundStyle = NSBackgroundStyleRaised; NSUInteger height_diff = self.vramWindow.frame.size.height - self.vramWindow.contentView.frame.size.height; CGRect vram_window_rect = self.vramWindow.frame; vram_window_rect.size.height = 384 + height_diff + 48; - [self.vramWindow setFrame:vram_window_rect display:YES animate:NO]; + [self.vramWindow setFrame:vram_window_rect display:true animate:false]; self.consoleWindow.title = [NSString stringWithFormat:@"Debug Console – %@", [self.fileURL.path lastPathComponent]]; @@ -846,7 +846,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) + (BOOL)autosavesInPlace { - return YES; + return true; } - (NSString *)windowNibName @@ -858,7 +858,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) - (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)type { - return YES; + return true; } - (IBAction)changeGBSTrack:(id)sender @@ -1061,7 +1061,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) - (void) windowWillExitFullScreen:(NSNotification *)notification { fullScreen = false; - self.view.mouseHidingEnabled = NO; + self.view.mouseHidingEnabled = false; } - (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)newFrame @@ -1156,14 +1156,14 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) } if (![console_output_timer isValid]) { - console_output_timer = [NSTimer timerWithTimeInterval:(NSTimeInterval)0.05 target:self selector:@selector(appendPendingOutput) userInfo:nil repeats:NO]; + console_output_timer = [NSTimer timerWithTimeInterval:(NSTimeInterval)0.05 target:self selector:@selector(appendPendingOutput) userInfo:nil repeats:false]; [[NSRunLoop mainRunLoop] addTimer:console_output_timer forMode:NSDefaultRunLoopMode]; } [console_output_lock unlock]; /* Make sure mouse is not hidden while debugging */ - self.view.mouseHidingEnabled = NO; + self.view.mouseHidingEnabled = false; } - (IBAction)showConsoleWindow:(id)sender @@ -1390,7 +1390,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) bitmapInfo, provider, NULL, - YES, + true, renderingIntent); CGDataProviderRelease(provider); CGColorSpaceRelease(colorSpaceRef); @@ -1598,7 +1598,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) } [self.memoryBankInput setStringValue:[NSString stringWithFormat:@"$%x", byteArray.selectedBank]]; [hex_controller reloadData]; - [self.memoryView setNeedsDisplay:YES]; + [self.memoryView setNeedsDisplay:true]; } - (GB_gameboy_t *) gameboy @@ -1608,7 +1608,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) + (BOOL)canConcurrentlyReadDocumentsOfType:(NSString *)typeName { - return YES; + return true; } - (void)cameraRequestUpdate @@ -1756,7 +1756,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) break; } window_rect.origin.y -= window_rect.size.height; - [self.vramWindow setFrame:window_rect display:YES animate:YES]; + [self.vramWindow setFrame:window_rect display:true animate:true]; } - (void)mouseDidLeaveImageView:(GBImageView *)view @@ -1851,7 +1851,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) case 0: return [Document imageFromData:[NSData dataWithBytesNoCopy:oamInfo[row].image length:64 * 4 * 2 - freeWhenDone:NO] + freeWhenDone:false] width:8 height:oamHeight scale:16.0/oamHeight]; @@ -1894,7 +1894,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) - (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(nullable NSTableColumn *)tableColumn row:(NSInteger)row { - return NO; + return false; } - (IBAction)showVRAMViewer:(id)sender @@ -1924,7 +1924,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) frame.size = self.feedImageView.image.size; [self.printerFeedWindow setContentMaxSize:frame.size]; frame.size.height += self.printerFeedWindow.frame.size.height - self.printerFeedWindow.contentView.frame.size.height; - [self.printerFeedWindow setFrame:frame display:NO animate: self.printerFeedWindow.isVisible]; + [self.printerFeedWindow setFrame:frame display:false animate: self.printerFeedWindow.isVisible]; [self.printerFeedWindow orderFront:NULL]; }); @@ -1955,8 +1955,8 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithCGImage:cgRef]; [imageRep setSize:(NSSize){160, self.feedImageView.image.size.height / 2}]; NSData *data = [imageRep representationUsingType:NSBitmapImageFileTypePNG properties:@{}]; - [data writeToURL:savePanel.URL atomically:NO]; - [self.printerFeedWindow setIsVisible:NO]; + [data writeToURL:savePanel.URL atomically:false]; + [self.printerFeedWindow setIsVisible:false]; } if (shouldResume) { [self start]; @@ -2077,9 +2077,9 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) - (BOOL)splitView:(GBSplitView *)splitView canCollapseSubview:(NSView *)subview; { if ([[splitView arrangedSubviews] lastObject] == subview) { - return YES; + return true; } - return NO; + return false; } - (CGFloat)splitView:(GBSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMinimumPosition ofSubviewAt:(NSInteger)dividerIndex @@ -2095,9 +2095,9 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) - (BOOL)splitView:(GBSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)view { if ([[splitView arrangedSubviews] lastObject] == view) { - return NO; + return false; } - return YES; + return true; } - (void)splitViewDidResizeSubviews:(NSNotification *)notification @@ -2277,7 +2277,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) NSBitmapImageRep *imageRep = (NSBitmapImageRep *)image.representations.firstObject; NSData *data = [imageRep representationUsingType:NSBitmapImageFileTypePNG properties:@{}]; - [data writeToFile:filename atomically:NO]; + [data writeToFile:filename atomically:false]; [self.osdView displayText:@"Screenshot saved"]; } @@ -2293,7 +2293,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) [savePanel orderOut:self]; NSBitmapImageRep *imageRep = (NSBitmapImageRep *)image.representations.firstObject; NSData *data = [imageRep representationUsingType:NSBitmapImageFileTypePNG properties:@{}]; - [data writeToURL:savePanel.URL atomically:NO]; + [data writeToURL:savePanel.URL atomically:false]; [[NSUserDefaults standardUserDefaults] setObject:savePanel.URL.path.stringByDeletingLastPathComponent forKey:@"GBScreenshotFolder"]; } diff --git a/Cocoa/GBAudioClient.m b/Cocoa/GBAudioClient.m index 7f2115d..81a51fd 100644 --- a/Cocoa/GBAudioClient.m +++ b/Cocoa/GBAudioClient.m @@ -90,7 +90,7 @@ static OSStatus render( { OSErr err = AudioOutputUnitStart(audioUnit); NSAssert1(err == noErr, @"Error starting unit: %hd", err); - _playing = YES; + _playing = true; } @@ -98,7 +98,7 @@ static OSStatus render( -(void) stop { AudioOutputUnitStop(audioUnit); - _playing = NO; + _playing = false; } -(void) dealloc @@ -108,4 +108,4 @@ static OSStatus render( AudioComponentInstanceDispose(audioUnit); } -@end \ No newline at end of file +@end diff --git a/Cocoa/GBBorderView.m b/Cocoa/GBBorderView.m index a5f5e81..d992e29 100644 --- a/Cocoa/GBBorderView.m +++ b/Cocoa/GBBorderView.m @@ -5,12 +5,12 @@ - (void)awakeFromNib { - self.wantsLayer = YES; + self.wantsLayer = true; } - (BOOL)wantsUpdateLayer { - return YES; + return true; } - (void)updateLayer diff --git a/Cocoa/GBCheatTextFieldCell.m b/Cocoa/GBCheatTextFieldCell.m index 611cade..1fdafea 100644 --- a/Cocoa/GBCheatTextFieldCell.m +++ b/Cocoa/GBCheatTextFieldCell.m @@ -114,7 +114,7 @@ return _fieldEditor; } _fieldEditor = [[GBCheatTextView alloc] initWithFrame:controlView.frame]; - _fieldEditor.fieldEditor = YES; + _fieldEditor.fieldEditor = true; _fieldEditor.usesAddressFormat = self.usesAddressFormat; return _fieldEditor; } diff --git a/Cocoa/GBCheatWindowController.m b/Cocoa/GBCheatWindowController.m index c10e2a9..5cc8f59 100644 --- a/Cocoa/GBCheatWindowController.m +++ b/Cocoa/GBCheatWindowController.m @@ -52,7 +52,7 @@ if (row >= cheatCount) { switch (columnIndex) { case 0: - return @(YES); + return @YES; case 1: return @NO; @@ -67,7 +67,7 @@ switch (columnIndex) { case 0: - return @(NO); + return @NO; case 1: return @(cheats[row]->enabled); diff --git a/Cocoa/GBColorCell.m b/Cocoa/GBColorCell.m index 0ad102a..549c3dd 100644 --- a/Cocoa/GBColorCell.m +++ b/Cocoa/GBColorCell.m @@ -42,7 +42,7 @@ static inline double scale_channel(uint8_t x) - (BOOL)drawsBackground { - return YES; + return true; } @end diff --git a/Cocoa/GBOpenGLView.m b/Cocoa/GBOpenGLView.m index 90ebf8d..2e4eb70 100644 --- a/Cocoa/GBOpenGLView.m +++ b/Cocoa/GBOpenGLView.m @@ -34,6 +34,6 @@ - (void) filterChanged { self.shader = nil; - [self setNeedsDisplay:YES]; + [self setNeedsDisplay:true]; } @end diff --git a/Cocoa/GBPreferencesWindow.m b/Cocoa/GBPreferencesWindow.m index 92aca78..60df2dd 100644 --- a/Cocoa/GBPreferencesWindow.m +++ b/Cocoa/GBPreferencesWindow.m @@ -69,8 +69,8 @@ - (void)close { joystick_configuration_state = -1; - [self.configureJoypadButton setEnabled:YES]; - [self.skipButton setEnabled:NO]; + [self.configureJoypadButton setEnabled:true]; + [self.skipButton setEnabled:false]; [self.configureJoypadButton setTitle:@"Configure Controller"]; [super close]; } @@ -268,12 +268,12 @@ dispatch_async(dispatch_get_main_queue(), ^{ is_button_being_modified = true; button_being_modified = row; - tableView.enabled = NO; - self.playerListButton.enabled = NO; + tableView.enabled = false; + self.playerListButton.enabled = false; [tableView reloadData]; [self makeFirstResponder:self]; }); - return NO; + return false; } -(void)keyDown:(NSEvent *)theEvent @@ -289,8 +289,8 @@ [[NSUserDefaults standardUserDefaults] setInteger:theEvent.keyCode forKey:button_to_preference_name(button_being_modified, self.playerListButton.selectedTag)]; - self.controlsTableView.enabled = YES; - self.playerListButton.enabled = YES; + self.controlsTableView.enabled = true; + self.playerListButton.enabled = true; [self.controlsTableView reloadData]; [self makeFirstResponder:self.controlsTableView]; } @@ -410,8 +410,8 @@ - (IBAction) configureJoypad:(id)sender { - [self.configureJoypadButton setEnabled:NO]; - [self.skipButton setEnabled:YES]; + [self.configureJoypadButton setEnabled:false]; + [self.skipButton setEnabled:true]; joystick_being_configured = nil; [self advanceConfigurationStateMachine]; } @@ -432,8 +432,8 @@ } else { joystick_configuration_state = -1; - [self.configureJoypadButton setEnabled:YES]; - [self.skipButton setEnabled:NO]; + [self.configureJoypadButton setEnabled:true]; + [self.skipButton setEnabled:false]; [self.configureJoypadButton setTitle:@"Configure Joypad"]; } } @@ -565,8 +565,8 @@ - (IBAction)selectOtherBootROMFolder:(id)sender { NSOpenPanel *panel = [[NSOpenPanel alloc] init]; - [panel setCanChooseDirectories:YES]; - [panel setCanChooseFiles:NO]; + [panel setCanChooseDirectories:true]; + [panel setCanChooseFiles:false]; [panel setPrompt:@"Select"]; [panel setDirectoryURL:[[NSUserDefaults standardUserDefaults] URLForKey:@"GBBootROMsFolder"]]; [panel beginSheetModalForWindow:self completionHandler:^(NSModalResponse result) { @@ -590,12 +590,12 @@ [self.bootROMsFolderItem setTitle:[url lastPathComponent]]; NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[url path]]; [icon setSize:NSMakeSize(16, 16)]; - [self.bootROMsFolderItem setHidden:NO]; + [self.bootROMsFolderItem setHidden:false]; [self.bootROMsFolderItem setImage:icon]; [self.bootROMsButton selectItemAtIndex:1]; } else { - [self.bootROMsFolderItem setHidden:YES]; + [self.bootROMsFolderItem setHidden:true]; [self.bootROMsButton selectItemAtIndex:0]; } } diff --git a/Cocoa/GBSplitView.m b/Cocoa/GBSplitView.m index a56c24e..d24d580 100644 --- a/Cocoa/GBSplitView.m +++ b/Cocoa/GBSplitView.m @@ -8,7 +8,7 @@ - (void)setDividerColor:(NSColor *)color { _dividerColor = color; - [self setNeedsDisplay:YES]; + [self setNeedsDisplay:true]; } - (NSColor *)dividerColor diff --git a/Cocoa/GBTerminalTextFieldCell.m b/Cocoa/GBTerminalTextFieldCell.m index c1ed203..e1ba957 100644 --- a/Cocoa/GBTerminalTextFieldCell.m +++ b/Cocoa/GBTerminalTextFieldCell.m @@ -17,7 +17,7 @@ return field_editor; } field_editor = [[GBTerminalTextView alloc] init]; - [field_editor setFieldEditor:YES]; + [field_editor setFieldEditor:true]; field_editor.gb = self.gb; return field_editor; } @@ -109,7 +109,7 @@ [self updateReverseSearch]; } else { - [self setNeedsDisplay:YES]; + [self setNeedsDisplay:true]; reverse_search_mode = true; } diff --git a/Cocoa/GBView.h b/Cocoa/GBView.h index a140b94..01481a7 100644 --- a/Cocoa/GBView.h +++ b/Cocoa/GBView.h @@ -18,7 +18,7 @@ typedef enum { @property (nonatomic, weak) IBOutlet Document *document; @property (nonatomic) GB_gameboy_t *gb; @property (nonatomic) GB_frame_blending_mode_t frameBlendingMode; -@property (nonatomic, getter=isMouseHidingEnabled) BOOL mouseHidingEnabled; +@property (nonatomic, getter=isMouseHidingEnabled) bool mouseHidingEnabled; @property (nonatomic) bool isRewinding; @property (nonatomic, strong) NSView *internalView; @property (weak) GBOSDView *osdView; diff --git a/Cocoa/GBView.m b/Cocoa/GBView.m index bbf1a5f..39a22e8 100644 --- a/Cocoa/GBView.m +++ b/Cocoa/GBView.m @@ -106,9 +106,9 @@ static const uint8_t workboy_vk_to_key[] = { { uint32_t *image_buffers[3]; unsigned char current_buffer; - BOOL mouse_hidden; + bool mouse_hidden; NSTrackingArea *tracking_area; - BOOL _mouseHidingEnabled; + bool _mouseHidingEnabled; bool axisActive[2]; bool underclockKeyDown; double clockMultiplier; @@ -183,7 +183,7 @@ static const uint8_t workboy_vk_to_key[] = { - (void) setFrameBlendingMode:(GB_frame_blending_mode_t)frameBlendingMode { _frameBlendingMode = frameBlendingMode; - [self setNeedsDisplay:YES]; + [self setNeedsDisplay:true]; } @@ -585,7 +585,7 @@ static const uint8_t workboy_vk_to_key[] = { - (BOOL)acceptsFirstResponder { - return YES; + return true; } - (void)mouseEntered:(NSEvent *)theEvent @@ -610,7 +610,7 @@ static const uint8_t workboy_vk_to_key[] = { [super mouseExited:theEvent]; } -- (void)setMouseHidingEnabled:(BOOL)mouseHidingEnabled +- (void)setMouseHidingEnabled:(bool)mouseHidingEnabled { if (mouseHidingEnabled == _mouseHidingEnabled) return; @@ -625,7 +625,7 @@ static const uint8_t workboy_vk_to_key[] = { } } -- (BOOL)isMouseHidingEnabled +- (bool)isMouseHidingEnabled { return _mouseHidingEnabled; } diff --git a/Cocoa/GBViewGL.m b/Cocoa/GBViewGL.m index b80973e..dda8584 100644 --- a/Cocoa/GBViewGL.m +++ b/Cocoa/GBViewGL.m @@ -19,7 +19,7 @@ NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:pf shareContext:nil]; self.internalView = [[GBOpenGLView alloc] initWithFrame:self.frame pixelFormat:pf]; - ((GBOpenGLView *)self.internalView).wantsBestResolutionOpenGLSurface = YES; + ((GBOpenGLView *)self.internalView).wantsBestResolutionOpenGLSurface = true; ((GBOpenGLView *)self.internalView).openGLContext = context; } @@ -27,8 +27,8 @@ { [super flip]; dispatch_async(dispatch_get_main_queue(), ^{ - [self.internalView setNeedsDisplay:YES]; - [self setNeedsDisplay:YES]; + [self.internalView setNeedsDisplay:true]; + [self setNeedsDisplay:true]; }); } diff --git a/Cocoa/GBViewMetal.m b/Cocoa/GBViewMetal.m index 958ad37..ae7443f 100644 --- a/Cocoa/GBViewMetal.m +++ b/Cocoa/GBViewMetal.m @@ -94,7 +94,7 @@ static const vector_float2 rect[] = withString:scaler_source]; MTLCompileOptions *options = [[MTLCompileOptions alloc] init]; - options.fastMathEnabled = YES; + options.fastMathEnabled = true; id library = [device newLibraryWithSource:shader_source options:options error:&error]; @@ -210,7 +210,7 @@ static const vector_float2 rect[] = { [super flip]; dispatch_async(dispatch_get_main_queue(), ^{ - [(MTKView *)self.internalView setNeedsDisplay:YES]; + [(MTKView *)self.internalView setNeedsDisplay:true]; }); } diff --git a/Cocoa/GBWarningPopover.m b/Cocoa/GBWarningPopover.m index 411e388..74f6444 100644 --- a/Cocoa/GBWarningPopover.m +++ b/Cocoa/GBWarningPopover.m @@ -10,7 +10,7 @@ static GBWarningPopover *lastPopover; lastPopover = [[self alloc] init]; [lastPopover setBehavior:NSPopoverBehaviorApplicationDefined]; - [lastPopover setAnimates:YES]; + [lastPopover setAnimates:true]; lastPopover.contentViewController = [[NSViewController alloc] initWithNibName:@"PopoverView" bundle:nil]; NSTextField *field = (NSTextField *)lastPopover.contentViewController.view; [field setStringValue:contents]; @@ -20,7 +20,7 @@ static GBWarningPopover *lastPopover; [lastPopover setContentSize:textSize]; if (!view.window.isVisible) { - [view.window setIsVisible:YES]; + [view.window setIsVisible:true]; } [lastPopover showRelativeToRect:view.bounds diff --git a/JoyKit/JOYController.m b/JoyKit/JOYController.m index 9b33b00..1097ef6 100644 --- a/JoyKit/JOYController.m +++ b/JoyKit/JOYController.m @@ -98,7 +98,7 @@ static void HIDReport(void *context, IOReturn result, void *sender, IOHIDReportT uint32_t reportID, uint8_t *report, CFIndex reportLength) { if (reportLength) { - [(__bridge JOYController *)context gotReport:[[NSData alloc] initWithBytesNoCopy:report length:reportLength freeWhenDone:NO]]; + [(__bridge JOYController *)context gotReport:[[NSData alloc] initWithBytesNoCopy:report length:reportLength freeWhenDone:false]]; } } diff --git a/QuickLook/generator.m b/QuickLook/generator.m index 92bb6ac..f2651d2 100644 --- a/QuickLook/generator.m +++ b/QuickLook/generator.m @@ -43,10 +43,10 @@ static OSStatus render(CGContextRef cgContext, CFURLRef url, bool showBorder) bitmapInfo, provider, NULL, - YES, + true, renderingIntent); CGContextSetInterpolationQuality(cgContext, kCGInterpolationNone); - NSGraphicsContext *context = [NSGraphicsContext graphicsContextWithGraphicsPort:(void *)cgContext flipped:NO]; + NSGraphicsContext *context = [NSGraphicsContext graphicsContextWithGraphicsPort:(void *)cgContext flipped:false]; [NSGraphicsContext setCurrentContext:context];