From d9424975d459f42a394e2200ff74f91f2edad5a6 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Wed, 15 Apr 2015 23:17:20 +1200 Subject: [PATCH] Fix OS X compiles --- Source/Constraint.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Constraint.swift b/Source/Constraint.swift index 1f81806..902f950 100644 --- a/Source/Constraint.swift +++ b/Source/Constraint.swift @@ -391,7 +391,7 @@ private extension NSLayoutAttribute { case .Trailing, .TrailingMargin: return point.x case .Width, .Height, .NotAnAttribute: return CGFloat(0) } - #else + #else switch self { case .Left, .CenterX: return point.x case .Top, .CenterY, .Baseline: return point.y @@ -415,14 +415,14 @@ private extension NSLayoutAttribute { case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left case .Width, .Height, .NotAnAttribute: return CGFloat(0) } - #else + #else switch self { case .Left, .CenterX: return insets.left case .Top, .CenterY, .Baseline: return insets.top case .Right: return insets.right case .Bottom: return insets.bottom - case .Leading, .LeadingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right - case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left + case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right + case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left case .Width, .Height, .NotAnAttribute: return CGFloat(0) } #endif