Skip to content

Commit 8015cac

Browse files
committed
Suppress warnings and remove unneeded #if-endif
1 parent e268fb8 commit 8015cac

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

src/MacVim/PSMTabBarControl/source/PSMMetalTabStyle.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,7 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
393393
if ([cell closeButtonPressed]) closeButton = metalCloseButtonDown;
394394

395395
closeButtonSize = [closeButton size];
396-
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
397396
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
398-
#else
399-
[closeButton setFlipped:YES];
400-
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
401-
#endif
402397

403398
// scoot label over
404399
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;

src/MacVim/PSMTabBarControl/source/PSMOverflowPopUpButton.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ - (void)drawRect:(NSRect)rect
4343
NSSize imageSize = [image size];
4444
rect.origin.x = NSMidX(rect) - (imageSize.width * 0.5);
4545
rect.origin.y = NSMidY(rect) - (imageSize.height * 0.5);
46-
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
4746
[image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
48-
#else
49-
[image setFlipped:YES];
50-
[image drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
51-
#endif
5247
}
5348

5449
- (void)mouseDown:(NSEvent *)event

src/MacVim/PSMTabBarControl/source/PSMUnifiedTabStyle.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,8 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
389389
if ([cell closeButtonPressed]) closeButton = unifiedCloseButtonDown;
390390

391391
closeButtonSize = [closeButton size];
392-
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
393392
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
394-
#else
395-
[closeButton setFlipped:YES];
396-
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
397-
#endif
398-
393+
399394
// scoot label over
400395
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
401396
}

src/MacVim/PSMTabBarControl/source/PSMYosemiteTabStyle.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,13 @@ - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlVie
379379
if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) {
380380
NSSize closeButtonSize = NSZeroSize;
381381
NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame];
382-
NSImage * closeButton = nil;
382+
NSImage *button = nil;
383383

384-
closeButton = nil;
385-
if ([cell closeButtonOver]) closeButton = closeButtonOver;
386-
if ([cell closeButtonPressed]) closeButton = closeButtonDown;
387-
388-
closeButtonSize = [closeButton size];
389-
[closeButton setFlipped:YES];
390-
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
384+
if ([cell closeButtonOver]) button = closeButtonOver;
385+
if ([cell closeButtonPressed]) button = closeButtonDown;
391386

387+
closeButtonSize = [button size];
388+
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
392389
}
393390

394391
// object counter

0 commit comments

Comments
 (0)