Merge pull request #7 from powerje/master

Fixes for RawOptionSetType changes in beta 6.
This commit is contained in:
Jonas Budelmann 2014-09-02 09:51:00 +12:00
commit 7c89f902e6
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ import AppKit
/** /**
* ConstraintAttributes is an options set that maps to NSLayoutAttributes. * ConstraintAttributes is an options set that maps to NSLayoutAttributes.
*/ */
struct ConstraintAttributes: RawOptionSetType { struct ConstraintAttributes: RawOptionSetType, BooleanType {
var value: UInt var value: UInt
var boolValue: Bool { var boolValue: Bool {
@ -43,6 +43,7 @@ struct ConstraintAttributes: RawOptionSetType {
} }
func toRaw() -> UInt { return self.value } func toRaw() -> UInt { return self.value }
func getLogicValue() -> Bool { return self.value != 0 } func getLogicValue() -> Bool { return self.value != 0 }
static var allZeros: ConstraintAttributes { return self(0) }
static func fromRaw(raw: UInt) -> ConstraintAttributes? { return self(raw) } static func fromRaw(raw: UInt) -> ConstraintAttributes? { return self(raw) }
static func fromMask(raw: UInt) -> ConstraintAttributes { return self(raw) } static func fromMask(raw: UInt) -> ConstraintAttributes { return self(raw) }
static func convertFromNilLiteral() -> ConstraintAttributes { return self(0) } static func convertFromNilLiteral() -> ConstraintAttributes { return self(0) }