From 0166c183c7122f9e3ede16e52d63ca1927909111 Mon Sep 17 00:00:00 2001 From: michael starke Date: Tue, 29 Aug 2017 14:58:42 +0200 Subject: [PATCH] use properties where possible --- MacPass/MPEntryViewController.m | 2 +- MacPass/MPOverlayView.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 890a568e..018a2e78 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -583,7 +583,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; #pragma mark Copy/Paste Overlays - (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOverlayInfoType)overlayInfoType name:(NSString *)name{ if(data) { - [[MPPasteBoardController defaultController] copyObjects:@[ data ]]; + [MPPasteBoardController.defaultController copyObjects:@[ data ]]; } NSImage *infoImage = nil; NSString *infoText = nil; diff --git a/MacPass/MPOverlayView.m b/MacPass/MPOverlayView.m index 87064985..005658d4 100644 --- a/MacPass/MPOverlayView.m +++ b/MacPass/MPOverlayView.m @@ -11,14 +11,14 @@ @implementation MPOverlayView - (void)drawRect:(NSRect)dirtyRect { - [[NSGraphicsContext currentContext] saveGraphicsState]; - [[NSColor clearColor] set]; + [NSGraphicsContext.currentContext saveGraphicsState]; + [NSColor.clearColor set]; NSRectFill(self.bounds); NSColor *backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.7]; NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:self.bounds xRadius:10 yRadius:10]; [backgroundColor set]; [path fill]; - [[NSGraphicsContext currentContext] restoreGraphicsState]; + [NSGraphicsContext.currentContext restoreGraphicsState]; } - (BOOL)isOpaque {