Fix up formatting

This commit is contained in:
Robert Payne 2015-04-11 17:12:05 +12:00
parent e0a859a578
commit 0126a0efc2
1 changed files with 65 additions and 65 deletions

View File

@ -89,71 +89,71 @@ internal struct ConstraintAttributes: RawOptionSetType, BooleanType {
internal static var CenterWithinMargins: ConstraintAttributes { return self(786432) } internal static var CenterWithinMargins: ConstraintAttributes { return self(786432) }
#endif #endif
internal var layoutAttributes:Array<NSLayoutAttribute> { internal var layoutAttributes:[NSLayoutAttribute] {
var attrs: Array<NSLayoutAttribute> = [] var attrs = [NSLayoutAttribute]()
if (self & ConstraintAttributes.Left) { if (self & ConstraintAttributes.Left) {
attrs.append(.Left) attrs.append(.Left)
} }
if (self & ConstraintAttributes.Top) { if (self & ConstraintAttributes.Top) {
attrs.append(.Top) attrs.append(.Top)
} }
if (self & ConstraintAttributes.Right) { if (self & ConstraintAttributes.Right) {
attrs.append(.Right) attrs.append(.Right)
} }
if (self & ConstraintAttributes.Bottom) { if (self & ConstraintAttributes.Bottom) {
attrs.append(.Bottom) attrs.append(.Bottom)
} }
if (self & ConstraintAttributes.Leading) { if (self & ConstraintAttributes.Leading) {
attrs.append(.Leading) attrs.append(.Leading)
} }
if (self & ConstraintAttributes.Trailing) { if (self & ConstraintAttributes.Trailing) {
attrs.append(.Trailing) attrs.append(.Trailing)
} }
if (self & ConstraintAttributes.Width) { if (self & ConstraintAttributes.Width) {
attrs.append(.Width) attrs.append(.Width)
} }
if (self & ConstraintAttributes.Height) { if (self & ConstraintAttributes.Height) {
attrs.append(.Height) attrs.append(.Height)
} }
if (self & ConstraintAttributes.CenterX) { if (self & ConstraintAttributes.CenterX) {
attrs.append(.CenterX) attrs.append(.CenterX)
} }
if (self & ConstraintAttributes.CenterY) { if (self & ConstraintAttributes.CenterY) {
attrs.append(.CenterY) attrs.append(.CenterY)
} }
if (self & ConstraintAttributes.Baseline) { if (self & ConstraintAttributes.Baseline) {
attrs.append(.Baseline) attrs.append(.Baseline)
} }
#if os(iOS) #if os(iOS)
if (self & ConstraintAttributes.FirstBaseline) { if (self & ConstraintAttributes.FirstBaseline) {
attrs.append(.FirstBaseline) attrs.append(.FirstBaseline)
} }
if (self & ConstraintAttributes.LeftMargin) { if (self & ConstraintAttributes.LeftMargin) {
attrs.append(.LeftMargin) attrs.append(.LeftMargin)
} }
if (self & ConstraintAttributes.RightMargin) { if (self & ConstraintAttributes.RightMargin) {
attrs.append(.RightMargin) attrs.append(.RightMargin)
} }
if (self & ConstraintAttributes.TopMargin) { if (self & ConstraintAttributes.TopMargin) {
attrs.append(.TopMargin) attrs.append(.TopMargin)
} }
if (self & ConstraintAttributes.BottomMargin) { if (self & ConstraintAttributes.BottomMargin) {
attrs.append(.BottomMargin) attrs.append(.BottomMargin)
} }
if (self & ConstraintAttributes.LeadingMargin) { if (self & ConstraintAttributes.LeadingMargin) {
attrs.append(.LeadingMargin) attrs.append(.LeadingMargin)
} }
if (self & ConstraintAttributes.TrailingMargin) { if (self & ConstraintAttributes.TrailingMargin) {
attrs.append(.TrailingMargin) attrs.append(.TrailingMargin)
} }
if (self & ConstraintAttributes.CenterXWithinMargins) { if (self & ConstraintAttributes.CenterXWithinMargins) {
attrs.append(.CenterXWithinMargins) attrs.append(.CenterXWithinMargins)
} }
if (self & ConstraintAttributes.CenterYWithinMargins) { if (self & ConstraintAttributes.CenterYWithinMargins) {
attrs.append(.CenterYWithinMargins) attrs.append(.CenterYWithinMargins)
} }
#endif #endif
return attrs return attrs
} }
} }
internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) { internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) {