Change += and -= to use inPlace ops and += should be union

This commit is contained in:
Ben Jones 2015-06-25 10:53:12 -07:00
parent c2eae8e90a
commit ef024cf351
1 changed files with 2 additions and 2 deletions

View File

@ -157,10 +157,10 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType {
} }
} }
internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) { internal func +=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
left = left.intersect(right) left.unionInPlace(right)
} }
internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) { internal func -=(inout left: ConstraintAttributes, right: ConstraintAttributes) {
left = left.subtract(right) left.subtractInPlace(right)
} }
internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool { internal func ==(left: ConstraintAttributes, right: ConstraintAttributes) -> Bool {
return left.rawValue == right.rawValue return left.rawValue == right.rawValue